Datetimefromparts is an date function and returns a datetime value for the specified date and time.
DATETIMEFROMPARTS Syntax:
DATETIMEFROMPARTS(year, month, day, hour, minute, seconds, milliseconds)
DATETIMEFROMPARTS Example:
SELECT DATETIMEFROMPARTS(2014, 2, 22, 8, 53, 39, 7) as Date_1,
DATETIMEFROMPARTS(2014, 2, 22, 8, 53, 39, 77) as Date_2,
DATETIMEFROMPARTS(2014, 2, 22, 8, 53, 39, 777) as Date_3;
Date_1 | Date_2 | Date_3 |
---|---|---|
2014-02-22 08:53:39.007 | 2014-02-22 08:53:39.077 | 2014-02-22 08:53:39.777 |