Hi All,
I know how to convert the current time to a specific timezone. My question is how to get a DateTime variable that represents a specific time based on timezone?
For example, 9am Eastern Standard Time.
Thanks!
Hi All,
I know how to convert the current time to a specific timezone. My question is how to get a DateTime variable that represents a specific time based on timezone?
For example, 9am Eastern Standard Time.
Thanks!
Hi,
If you can use custom activity, the following might help you.
Regards,
In the case of Datetime variable, it may or may not have information about Timezone.
ex) DateTime.Now has a timezone of system time, in my case Seoul UTC+9.
but new Datetime(2020,5,12,10,0,0) (12.05.2020 10:00:00) does not have a TimeZone.,does not have timezone info
If you want to convert the system’s current time to a specific time zone, the code below will work.
The code below converts the system’s current time to EST. I will attach the relevant MSDN document. If you have more questions, please ask.
Thanks alot buddy. This helped.
But I am still having a doubt, as I have been inside the for loop, (for each mail from mailbox),
When I used (DateTime.now) as follows, it worked perfectly fine:
“timezoneinfo.ConvertTime(DateTime.now,TimeZoneInfo.FindSystemTimeZoneById(“US Eastern Standard Time”))”
When I used my creteria (mail.ReceivedDateTime), as follows, it was showing below errors:
“timezoneinfo.ConvertTime(mail.ReceivedDateTime,TimeZoneInfo.FindSystemTimeZoneById(“US Eastern Standard Time”))”
Thanks Jihun. This is useful info.