GMT date convertion
Convert "Fri Nov 05 2010 05:30:00 GMT+0530 (India Standard Time)" to DateTime format in C#.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Jun 7, 2011, 8:12 AM
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();