Hi All,
I wanted to convert Indian Standard Time (MM/dd/yyyy HH:mm:ss) to Eastern Standard Time(MM/dd/yyyy HH:mm:ss). Can anyone tell how to achieve this?
Hi All,
I wanted to convert Indian Standard Time (MM/dd/yyyy HH:mm:ss) to Eastern Standard Time(MM/dd/yyyy HH:mm:ss). Can anyone tell how to achieve this?
Hi @Manisha24
Try this
EST = TimeZoneInfo.ConvertTimeFromUtc(TimeZoneInfo.ConvertTimeToUtc(DateTime.ParseExact(InputDate, "MM/dd/yyyy HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture), TimeZoneInfo.FindSystemTimeZoneById("India Standard Time")), TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")).ToString("MM/dd/yyyy HH:mm:ss")
Regards,
Hi @Manisha24
Check this:
inputDateTime = "08/13/2024 03:40:05"
istDateTime = DateTime.ParseExact(inputDateTime.ToString(), "MM/dd/yyyy HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture)
estDateTime = TimeZoneInfo.ConvertTime(istDateTime, TimeZoneInfo.FindSystemTimeZoneById("India Standard Time"), TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")).ToString("MM/dd/yyyy HH:mm:ss")
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.