GMT date convertion
Convert "Fri Nov 05 2010 05:30:00 GMT+0530 (India Standard Time)" to DateTime format in C#.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend3days leftRegister
Posted Jun 7, 2011, 4:12 AM EDT
string s1 = "Fri Nov 05 2010 05:30:00";
CultureInfo ci = new CultureInfo("en-IN");
string date = s1.ToString(ci);
DateTime convertedDate = DateTime.SpecifyKind(DateTime.Parse(s1), DateTimeKind.Utc);
var kind = convertedDate.Kind;
DateTime dt2 = convertedDate.ToLocalTime();