Function |
Description |
CURRENT_TIMESTAMP |
Returns a datetime2(7) value that contains the date and time of the computer on which the instance of SQL Server is running. The time zone offset is not included.
Syntax:
CURRENT_TIMESTAMP
|
DATEADD |
Returns a new datetime value based on adding an interval to the specified date.
Syntax:
DATEADD (datepart , number, date )
|
DATEDIFF |
Returns the number of date and time boundaries crossed between two specified dates.
Syntax:
DATEDIFF ( datepart , startdate , enddate )
|
DATENAME |
Returns a character string representing the specified datepart of the specified date.
Syntax:
DATENAME ( datepart ,date )
|
DATEPART |
Returns an integer that represents the specified datepart of the specified date.
Syntax:
DATEPART ( datepart , date )
|
DAY |
Returns an integer representing the day datepart of the specified date.
Syntax:
DAY ( date )
|
GETDATE |
Returns the current system date and time in the SQL Server standard internal format for datetime values.
Syntax:
GETDATE ( )
|
GETUTCDATE |
Returns the datetime value representing the current UTC time (Coordinated Universal Time or Greenwich Mean Time). The current UTC time is derived from the current local time and the time zone setting in the operating system of the computer on which the instance of Microsoft SQL Server is running.
Syntax:
GETUTCDATE ( )
|
ISDATE |
Determines whether a datetime or smalldatetime input expression is a valid date or time value.
Syntax:
ISDATE ( expression )
|
MONTH |
Returns an integer that represents the month part of a specified date.
Syntax:
MONTH ( date )
|
YEAR |
Returns an integer that represents the year part of a specified date.
Syntax:
YEAR ( date )
|