h1

MS SQL Server Transact-SQL NOW() Function

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.

13 comments to “MS SQL Server Transact-SQL NOW() Function”

  1. You really did help me to get it quicker :)
    Thanks :)


  2. […] Solution via The Matt Faus Blog […]


  3. […] Matt Faus’s blog: MS SQL Server Transact-SQL NOW() Function […]


  4. Much appreciated, good Sir. Exactly what I was looking for. :-)


  5. Thank you very much. Was trying to find just this.


  6. Excellent find; thank you!


  7. Does anyone know if there is another language or set of commands beside SQL for talking with databases?

    I’m working on a project and am doing some research thanks


  8. You know, the thing about SQL is, that there is virtually nothing that can replace it.

    Does anyone know if a substitute exists for sql? I mean besides MS SQL and Oracle and all that jazz. Thanks.


  9. Not really. Why would you want a replacement SQL is incredibly powerful.

    You might look into LINQ within .NET.


  10. Thank you very much Matt!


  11. Thanks. This was spot on.


  12. Cheers! Love it when good people such as yourselves blog these things. :)


  13. Thank you!!


Leave a Comment