T-SQL supports two functions related to date and time values with an offset: SWITCHOFFSET and TODATETIMEOFFSET.
With the SWITCHOFFSET function, you can return an input DATETIMEOFFSET value in a requested offset term. For example, consider the expression SWITCHOFFSET(SYSDATETIMEOFFSET(), ‘-08:00’). Regardless of the offset of the instance you are connected to, you request to present the current date and time value in terms of offset ‘-08:00’. If the system’s offset is, ...
- 2. Getting Started with the SELECT Statement
- from Training Kit (Exam 70-461): Querying Microsoft® SQL Server® 2012
- Publisher: Microsoft Press
- Released: December 2012
Share this highlighthttp://www.safaribooksonline.com/a/training-kit-exam/13983/