Hi,
It seems that the Date & Time Variable “Now” will return the local time of my computer .
If my computer is several minutes before of behind the “correct time”, is there such a function to get the “correct time”?
Thank you in advance and look forward to your reply.
avejr748
(Ave Salvante Jr)
July 6, 2020, 2:30am
2
Hello @GhostBuster , you can use DateTime.Now.AddHours(intTimeDiff) where intTimeDiff is the time difference of your local computer and the “correct time” you are looking for.
Hi, @avejr748 ,
Thank you for the reply.
Is there a straightforward way retrieve the “correct time” because most of the time the “difference” may be unknown?
avejr748
(Ave Salvante Jr)
July 6, 2020, 2:54am
4
@GhostBuster I don’t think so. One suggestion I can give you if you are going to refer to different locations is to have a datatable with the location name and the time difference in the location. Then lookup the datatable to know what timedifference to use
Srini84
(Srinivas Kadamati)
July 6, 2020, 4:44am
5
@GhostBuster
If you have internet access in your production, then you can try with some free api’s to retrieve the time of different countries
Check link below a sample api
Mark as solution if it helps
Thanks
Thanks for the reply from @Srini84 and @avejr748 .
So it can be concluded that no built-in function is available to directly retrieve the “correct time”. Am I right?
avejr748
(Ave Salvante Jr)
July 6, 2020, 6:56am
7
Yes, because “correct time” is relative as it depends on location
Hi @GhostBuster
We have inbuilt function to get the Date and Time by using Time zone.(if you give your you will get correct time other than system time
I have created a workflow to get date time with time zones by using inbuilt function.
PFA workflow for your referenceEST_Date_Conversion.zip (51.7 KB) )
Thanks
Latika