The international string representation format is (YYYY-MM-DD HH:MM:SS ±HHMM).
e.g. 2010-06-10 21:21:10 -0400
basically the problem I am having is figuring out how to get the difference from GMT.
DateTime dt = new DateTime(2008, 3, 9, 16, 5, 7, 123);
String.Format("{0:yyyy-MM-dd HH:mm:ss ????}", dt);
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss zzz");
will output:
2010-06-29 08:25:16 -07:00
string isoFormat = inputDateTime.Format("s");
I would go with ISO format
.
And the W3C has also a note on the topic: Date and Time Formats
.
These are international standards.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With