January 17, 2017

Using DATEFROMPARTS SQL Function

The DATEFROMPARTS function returns a date value with the date portion set to the specified year, month and day, and the time portion set to the default. An example follows: SELECT DATEFROMPARTS ( 2016, 12, 15 ) AS ResultResult ———————————- 2016-12-15 (1 row(s) affected)