T-SQL Tutorial

DATEFROMPARTS Date Function


Datefromparts is an date function and returns a date value for the specified year, month or day. Datefromparts function requires 3 arguments.

DATEFROMPARTS Syntax:

DATEFROMPARTS ( year, month, day )

DATEFROMPARTS Example:

SELECT DATEFROMPARTS ( 2014, 02, 22 ) AS Date;

Date
2014-02-22