DATEFROMPARTS#
Returns a date value for the specified year, month, and day.
Syntax#
DATEFROMPARTS ( year, month, day )
Arguments#
year
Integer expression specifying a year.
month
Integer expression specifying a month, from 1 to 12.
day
Integer expression specifying a day.
Return types#
date
Examples#
DECLARE @a int = 2016;
DECLARE @b int = 4;
DECLARE @c int = 20;
SELECT DATEFROMPARTS(@a, @b, @c);