Hello, I am using a “get mail” activity and its returning the full date with time zone and I need to convert it to standard time. Basically, I want to pull emails if they are form today, and within the last 5 minutes. I tried using an if function but I cant figure out the syntax to get the today function to match with the same format
(this is what the mail.date.tostring returns) Sat, 08 Oct 2022 08:44:17 -0500
Not sure why it return the date with the zone for you. since you just need to compare the email time with the current time you can use a simple if condition:
mail.Headers(“Date”) >= Now.AddMinutes(5)
if mail.Headers(“Date”) returns a string you can use Convert.ToDateTime(mail.Headers(“Date”))