SQL Server 101 – Return the Current DateTime

If you want to return the current date time in SQL Server , the easiest way to do it is using the GETDATE() function.

How to return the Current DateTime in SQL Server ?

The GETDATE() function returns the current date along with the time.

SELECT GETDATE()

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this blog post, let’s learn about the error message “1459 – An error occurred while accessing the database mirroring...
In this blog post, let’s learn about the error message “7937 – Columnstore index has one or more missing column...