EZ

Eduzan

Learning Hub

Eduzan
Eduzan / SQL

Date Functions in SQL

DefinitionGETDATE() is a function that returns the current date and time according to the system on which the SQL server instance is running. It is used to record timestamps for transactions, logging, or other date-related operations.

Example:

SELECT GETDATE() AS CurrentDateTime;

Explanation: This query retrieves the current system date and time, which can be used to stamp records with a creation date or for other records that require a timestamp.

End of lesson.