There's a whole list of possible date formats. If it contains +0200 (GMT + 2
hours) there is no native conversion (I have been searching on that as
well!, only Javascript has an implementation out of the box).
If it is a date/time string that ends with GMT you can use this
DateTime conv = DateTime.ParseExact([yourtimestring], "r", null); // instead
null you also can supply a parameter that seems optional.
hallo egbert,
bedankt voor je reaktie.
my string format is like this: ("yyyy-MM-ddTHH:mm:ss.fffZ").
this is a format that i get from my exchange server and i want to save it in
my DB.
is this ok?
what about to convert it first to localtime and then convert it back to
UTC?is this ok?
what's your sugestion?
thanks in advance.
hallo egbert,
bedankt voor je reaktie.
my string format is like this: ("yyyy-MM-ddTHH:mm:ss.fffZ").
this is a format that i get from my exchange server and i want to save it
in
my DB.
is this ok?
what about to convert it first to localtime and then convert it back to
UTC?is this ok?
what's your sugestion?
thanks in advance.
And you can parse them like this
DateTime mydate= DateTime.ParseExact("yyyy-MM-ddTHH:mm:ss.fffZ", "s",
System.Globalization.DateTimeFormatInfo.InvariantCulture);
And vice versa
string myiso8601 = myDate.ToString("s");
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.