Reputation: 23
I'm trying to insert the date in a a query, using the NOW()
statement.
However only the Y-m-d are being inserted correctly, while the hours, minutes and seconds are all appearing zeros ( 00:00:00 )
Any reason for that?
Upvotes: 2
Views: 9673
Reputation: 13283
Try this :
SELECT CURRENT_TIMESTAMP
or
SELECT GETDATE()
or
Select {fn NOW()}
Note the accolades in the function.
Upvotes: 1