Monday, July 1, 2013

Convert string date to dateTime format ERROR



Try parse it as a DateTimeOffset and then apply the ToString() method on the DateTime property:



string s = "2013-07-01T11:10:00+02:00";
string dto = DateTimeOffset.Parse(s).DateTime.ToString("HH:mm dd/MM/yyyy");


No comments:

Post a Comment