Monday, July 1, 2013

Convert string date to dateTime format ERROR

Using the System.Globalization.CultureInfo.InvariantCulture you should get 11:10:



string s = "2013-07-01T11:10:00+02:00";
DateTime dt = Convert.ToDateTime(s, System.Globalization.CultureInfo.InvariantCulture);
string t = dt.ToString("HH:mm dd/MM/yyyy");


No comments:

Post a Comment