DATEFROMPARTS (TSQL Function)

Returns a date created from the specified year, month, day.

Syntax

DATEFROMPARTS ( year, month , day )

Arguments

year
is an expression of type int.
month
is an expression of type int.
day
is an expression of type int.

Return Types

Returns date.

Examples

PRINT DATEFROMPARTS(2016, 07, 31);

The result is:

2016-07-31
RSQL, a simple alternative to Microsoft SQL Server