GETDATE

The GETDATE function produces the current date and time in SQL Server internal format for datetime values. GETDATE takes the null parameter ( ).

To find the current system date and time:

SELECT GETDATE()

-------------------------
July 29 1995   2:50    PM

(1 row(s) affected)

You might use GETDATE in designing a report so that the current date and time are printed every time the report is produced. GETDATE is also useful for functions such as logging the time a transaction occurred on an account.