
MS SQL Server Transact-SQL NOW() Function
Saturday, February 16th, 2008
Recently, I was searching around for how to obtain the current day’s datetime using a SQL query in SQL Server Management studio. I know I had obtained this value from MySQL with NOW() function, but could find nothing of the sort for Microsoft’s SQL Server. After digging around in MSDN Library, I found this:
http://msdn2.microsoft.com/en-us/library/ms188383.aspx
SELECT GETDATE();
Hopefully this post will allow others searching like I did to find what they are looking for quicker.
Recently, I was searching around for how to obtain the current day’s datetime using a SQL query in SQL Server Management studio. I know I had obtained this value from MySQL with NOW() function, but could find nothing of the sort for Microsoft’s SQL Server. After digging around in MSDN Library, I found this:
http://msdn2.microsoft.com/en-us/library/ms188383.aspx
SELECT GETDATE();
Hopefully this post will allow others searching like I did to find what they are looking for quicker.
