Hello experts
I am new to uipath and trying to read mail timestamp from Gmail using imap activities .
I am trying to parse date/timestamp using Datetime.ParseExact and convert to string. I would like to know what will be format string for this function when date/ timestamp are given in format below
Mon, 23 Nov 2020 15:31:54 +0000
Mon, 23 Nov 2020 02:18:45 -0600 (CST)
Sun, 22 Nov 2020 23:59:53 -0800
As of now I am using format like this
“ddd, d MMM yyyy HH:mm:ss -0600 (CST)”
Bu it will work for format given in example 2.
But time zone part is not fixed so I wonder how can I handle this.
Thanks in advance.
Can you check Kind property of your DateTime variable (like dtVar.Kind )? Probably it’s recognized as Local.
If you want to change UTC to Local or Local to UTC, DateTime.ToUniversalTime() or DateTime.ToLocalTime() helps you…