Technology · Reference dataset

SQL Server Date Functions

SQL Server date and time functions with a description, the documented syntax, the return type, a documented example with its result, and a link to the Microsoft documentation.

Download options
Look inside

Every record

All 13 records · Last changed November 15, 2026 · Select a column heading to sort. Select a row to read the whole record.

Preview of SQL Server Date Functions
Function Description Syntax Return type Example Result Doc url
CURRENT_TIMESTAMP Returns the current date and time CURRENT_TIMESTAMP datetime https://learn.microsoft.com/en-us/sql/t-sql/functions/current-timestamp-transact-sql
DATEADD Adds a time/date interval to a date and then returns the date DATEADD (datepart, number, date) The return value data type for this method is dynamic SELECT DATEADD(month, 1, '20240830'); 2024-09-30 00:00:00.000 https://learn.microsoft.com/en-us/sql/t-sql/functions/dateadd-transact-sql
DATEDIFF Returns the difference between two dates DATEDIFF (datepart, startdate, enddate) int SELECT DATEDIFF(day, '2007-05-07 09:53:01.0376635', '2007-05-08 09:53:01.0376635'); 1 https://learn.microsoft.com/en-us/sql/t-sql/functions/datediff-transact-sql
DATEFROMPARTS Returns a date from the specified parts (year, month, and day values) DATEFROMPARTS (year, month, day) date SELECT DATEFROMPARTS (2010, 12, 31) AS Result; 2010-12-31 https://learn.microsoft.com/en-us/sql/t-sql/functions/datefromparts-transact-sql
DATENAME Returns a specified part of a date (as string) DATENAME (datepart, date) nvarchar https://learn.microsoft.com/en-us/sql/t-sql/functions/datename-transact-sql
DATEPART Returns a specified part of a date (as integer) DATEPART (datepart, date) int SELECT DATEPART(year, 0), DATEPART(month, 0), DATEPART(day, 0); 1900 1 1 https://learn.microsoft.com/en-us/sql/t-sql/functions/datepart-transact-sql
DAY Returns the day of the month for a specified date DAY (date) int SELECT DAY('2015-04-30 01:01:01.1234567'); 30 https://learn.microsoft.com/en-us/sql/t-sql/functions/day-transact-sql
GETDATE Returns the current database system date and time GETDATE() datetime https://learn.microsoft.com/en-us/sql/t-sql/functions/getdate-transact-sql
GETUTCDATE Returns the current database system UTC date and time GETUTCDATE() datetime https://learn.microsoft.com/en-us/sql/t-sql/functions/getutcdate-transact-sql
ISDATE Checks an expression and returns 1 if it is a valid date, otherwise 0 ISDATE (expression) int SELECT ISDATE('04/15/2008'); 1 https://learn.microsoft.com/en-us/sql/t-sql/functions/isdate-transact-sql
MONTH Returns the month part for a specified date (a number from 1 to 12) MONTH (date) int SELECT MONTH('2007-04-30T01:01:01.1234567 -07:00'); 4 https://learn.microsoft.com/en-us/sql/t-sql/functions/month-transact-sql
SYSDATETIME Returns the date and time of the SQL Server SYSDATETIME () datetime2(7) https://learn.microsoft.com/en-us/sql/t-sql/functions/sysdatetime-transact-sql
YEAR Returns the year part for a specified date YEAR (date) int SELECT YEAR('2010-04-30T01:01:01.1234567-07:00'); 2010 https://learn.microsoft.com/en-us/sql/t-sql/functions/year-transact-sql

Open this data in a free tool: CSV to JSON · JSON formatter · SQL INSERT generator · CSV to XML

CSV / JSON / XML

Put this data to work.

All 13 records are available without a pass, within the free request limits.

  • CSV for spreadsheets and lookup tables
  • JSON for apps and data analysis
  • XML for imports and integrations
Choose your file

Lost your key?

Commercial use is allowed, free or paid.

Downloaded a CSV? Convert CSV to JSON, generate SQL inserts, remove duplicate lines, or sort a list with the free tools.

Scope and sources

Last checked against sources: October 15, 2026.

Last changed: November 15, 2026. This is when we last changed the data or its description. It doesn’t mean the data runs up to that date.

SQL Server Date Functions has 13 records and 7 fields: Function, Description, Syntax, Return type, Example, Result, Doc url.

A complete download includes all 13 records currently held in this dataset. Check the description and sources to decide whether its scope fits your project.

Use this dataset through the API
GET https://mysafeinfo.com/api/data/sqlserverdatefunctions

Choose a format, sort, or request fewer rows. A pass key gives access to the complete dataset. See the examples and parameters.

More in Technology

Git Commands HTML Colors Microsoft Access Data Types MySQL Data Types Operating Systems Programming Languages

Download a category with your pass