The date in UiPath Db is stored in GMT format. Can it be converted to PST timezone?
Solution
Please follow the below steps:
- Login to Orchestrator -> Profile -> Settings -> General
- Modify the TimeZone based on the requirement. (PST = UTC -8 )
The date in UiPath Db is stored in GMT format. Can it be converted to PST timezone?
Solution
Please follow the below steps:
hi @PranayaSahu
Check this code
var dt = DateTime.Parse(“1/1/2013”);
MessageBox.Show(TimeZoneInfo.ConvertTimeToUtc(dt, TimeZoneInfo.Local).ToString());
Thanks
Ashwin S
This doesn’t work for me. I have had the timezone set in the Orchestrator GUI correctly as you describe. What I see on the screen is correctly displayed in my timezone. But the timestamp in the database is 5 hours off because it’s still stored in UTC and not the time I specified. I’d like to be able to build a report from data in the Orchestrator database without having to convert to/from UTC. Is there such an option?
If you want convert Date and time in one time zone to another time zone use the Following logic:
Assign Date = “Date u want to set”
Assign SourceTimeZone = TimeZoneInfo.FindSystemTimeZoneById(“Actual time zone”)
Assign DestinationTimeZone = TimeZoneInfo.FindSystemTimeZoneById(“Expected Time Zone”)
Assign ConversionOfTimeZone = TimeZoneInfo.ConvertTime(Date, SourceTimeZone, DestinationTimeZone)
Variable Description:
SourceTimeZone : System.TimeZoneInfo
DestinationTimeZone : System.TimeZoneInfo
ConversionOfTimeZone : System.DateTime
hi,
I want to do this conversion for a whole data column without using the loop. Can anyone please tell me how to do that.
My Requirement : I have the data table. It has a date time column which is in UTC Timezone. I just want to convert into IST without iterating through loop. because i have huge number of records.
Thanks!