Insert or update current date in DATETIME format - SQL

What SQL function should I use to insert or update current date in DATETIME format in table cell ? I tried to use GETDATE() but it is not working.
07 Dec 2020 at 04:26 PM
0pnshow more
StorStor
Hi,

To insert actual date into table cell, you can try to use NOW().

The SQL should look like:

INSERT INTO product_updates (id_update, id_product, id_user, date, status) VALUES (NULL, 10, 25, NOW(), 'new');
09 Dec 2020 at 10:07 AM
0pnshow more
TimTim
Share on FacebookShare on TwitterShare on LinkedInSend email
2021 AnswerTabsTermsContact us