When NOW() is GETDATE()
15 July 2008 | Posted by Jeffrey Barke | No comments
Based on Matt Faus' post, I know I'm not the first to struggle with this simple syntactical problem: how to get the current date and time via a function in Microsoft's SQL Server?
In MySQL, we use NOW(), but it didn't work here. However, GETDATE() does!
To return the current system date and time in SQL Server:
SELECT GETDATE();
Read the full documentation at MSDN.
Solution via The Matt Faus Blog


Leave a Reply