SQL Server Date Functions

Technology 13 records updated 2026-07-17

SQL Server Date Functions, with function, and description.

Get this data

GET https://mysafeinfo.com/api/data/sqlserverdatefunctions

JSON XML CSV Download CSV

Sort, page, randomize, and download with query parameters; see the documentation.

Try it live

Run a request against sqlserverdatefunctions straight from your browser. Add your API key to lift the row cap and return every record. The call goes to the API and nothing is stored here.

Preview

First 13 of 13 records. Click a column to sort these rows.

ID Function Description
1 CURRENT_TIMESTAMP Returns the current date and time
2 DATEADD Adds a time/date interval to a date and then returns the date
3 DATEDIFF Returns the difference between two dates
4 DATEFROMPARTS Returns a date from the specified parts (year, month, and day values)
5 DATENAME Returns a specified part of a date (as string)
6 DATEPART Returns a specified part of a date (as integer)
7 DAY Returns the day of the month for a specified date
8 GETDATE Returns the current database system date and time
9 GETUTCDATE Returns the current database system UTC date and time
10 ISDATE Checks an expression and returns 1 if it is a valid date, otherwise 0
11 MONTH Returns the month part for a specified date (a number from 1 to 12)
12 SYSDATETIME Returns the date and time of the SQL Server
13 YEAR Returns the year part for a specified date

Notes