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

Leave a Reply

Leave a comment

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

*


x

Related Posts

Batch script to deploy multiple SQL files
I was working on a project where I’m supposed to deploy lots of SQL Server script files (.sql). It’s very tedious job either to manually execute ...
Performance View on INNER JOIN and OUTER JOIN
Hope you guys are getting ready for Diwali Festival :-). Before you guys start with the festival event I thought of writing an article on perform...
Synonyms - SQL Server
I was working in a project where we are using database mirroring as high availability solution. In the same instance we have multiple databases i...
powered by RelatedPosts