13-08-2008

ISO-8601 DateTime .NET

Wiered...

DateTime.Now.ToString('s') -> 2008-08-13T13:22:32
DateTime.now.ToString('u') -> 2008-08-13 13:22:32Z

None of them are close enough to iso8601?...

One has to use
DateTime.Now.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'sszz'00'") -> 2008-08-13T13:22:32-0400

Any shorter way to do this?....

0 comentarios: