DATETIMEOFFSETFROMPARTS function – SQL Server Denali

This function is also new to SQL Server denali however this function got some more arguments compared to DATETIMEFROMPARTS function. I’m not sure how frequently we will use this as it’s more precise to give you the values.  If the arguments are not valid then an error is raised or if the argument is NULL then it will return a NULL value.

Syntax is below

DATETIMEOFFSETFROMPARTS ( year, month, day, hour, minute, seconds, fractions, hour_offset, minute_offset, precision )

An example for this function

SELECT DATETIMEOFFSETFROMPARTS(2011,09,02,23,55,9,54,5,30,5)

datetimeoffsetfromparts


Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *