views:

278

answers:

1

I am trying to use the new DATETIMEOFFSET data type in SQL 2008 but I can't figure out how to get the DATETIMEOFFSET '2008-09-27 21:28:17.2930000 -07:00' to show as '2008-09-27 14:28:17.2930000' (basically applying the offset to show the local time).

Does anyone know how to do this?

+1  A: 

The following MSDN articles appear to cover this:

It appears that you need to cast the datetimeoffset into another format, such as datetime, but the sample code on the 'CAST and CONVERT' page is not clear on that.

warren
It would be helpful if the URLs in your answer were clickable.
Jonathan Leffler
apparently they're not if in code blocks
warren

related questions