|
Home > Archive > MS SQL XML > December 2006 > TimeZone/UTC support FOR XML
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
TimeZone/UTC support FOR XML
|
|
| dotNetProfessional 2006-11-22, 12:16 am |
| Greeetings
I'm getting the hint that SQL 2005's datetime doesn't understand timezones.
This is probably Ok for the most part as I can send dates as UTC from the
client. However, once I have a UTC date recorded I want to use the FOR XML
PATH syntax (great job here btw!) to return my dates. Now, how do I tell the
XMLSerializer (without writting a custom deserializer!) that the dates being
returned from SQLServer are UTC? I know the serializer understands correctly
formatted date's but SQL Server by default won't return this as it doesn't
know its a UTC date. Is there any way to tell the SQL FOR XML serializer that
a date is a UTC date so that its encoded correctly???
Any help will be appreciated.
--
Garry McGlennon
MCSD, MCSD.NET
| |
| Mike C# 2006-12-10, 5:15 am |
|
"dotNetProfessional" < dotNetProfessional@d
iscussions.microsoft.com> wrote in
message news:99A746E0-4602-43C4-B9B6- A41A929F0B7D@microso
ft.com...
> Greeetings
>
> I'm getting the hint that SQL 2005's datetime doesn't understand
> timezones.
> This is probably Ok for the most part as I can send dates as UTC from the
> client. However, once I have a UTC date recorded I want to use the FOR XML
> PATH syntax (great job here btw!) to return my dates. Now, how do I tell
> the
> XMLSerializer (without writting a custom deserializer!) that the dates
> being
> returned from SQLServer are UTC? I know the serializer understands
> correctly
> formatted date's but SQL Server by default won't return this as it doesn't
> know its a UTC date. Is there any way to tell the SQL FOR XML serializer
> that
> a date is a UTC date so that its encoded correctly???
How about a CONVERT using style 127, which is ISO8601 format with timezone
"Z" (yyyy-mm-ddThh:mm:ss.mmmZ).
|
|
|
|
|