Unfortunately, .NET does not contain a standard format for DateTime that is compatible with W3C (see the specification http://www.w3.org/TR/NOTE-datetime ). A W3C compatible string containing the date and time is very useful as it is the standard format for many technologies such as Sitemaps, PingBack, RSS, etc.
From here
What they recommend AnyValidDateTime.ToUniversalTime().ToString("u").Replace(" ", "T");
source
share