In my recent project i was looking for a built-In SQL function that returns me the current date as timestamp. As we know Date values are stored in Tables as timestamp.A SQL timestamp is a record containing date/time data, such as the month, day, year, hour, and minutes/seconds.
SQL offers a built-in function called GETDATE() that returns the current date in the form of a SQL timestamp.
Hence to get current date run the below query:
SELECT GETDATE();
and the timestamp result will be
2009-05-20 01:23:45.150000.(Current Date)
hi brijesh
ReplyDeleteits excellent stuff ..