Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top