How to get gmail date which is (Created at:) Datetime in IMAP

Hi All,

I need to get (“Created at:”) datetime from gmail anyone knows how to achieve it?
I do not want to use item.header(“Date”).tostring as it do not give me local time sometimes.
Plus I am using IMAP.
Please help.
Regards
Vaneet

MailVariable.Headers(“Date”)

Hi @Pradeep_Shiv

It will give me local server datetime which have several timezones and it need to be converted to my system timezone which is complicated and lengthy that i do not want.
I need date which is (created at:) as it is in my system time zone format

Hi @Pradeep_Shiv
Check this

[ReceivedTime] > ’ " + Now.AddDays(-1).ToString(“MM/dd/yyyy”) + " ’ AND [ReceivedTime] <= ’ " + Now.Date.ToString(“MM/dd/yyyy”) + " ’ “)

Thanks
Ashwin S

it’s @vaneet_kumar

Extremely sorry

Thanks
Ashwin S

1 Like

not a problem cheers @AshwinS2

Thanks @AshwinS2
I can use this in getoutlook mail message activity in filter property but how can i use in IMAP as there is no criteria filter?

Hi @vaneet_kumar

do loop it through for each item in Mail Message and then based on the condition you can retrieve the message

Thanks
Ashwin S

@AshwinS2
Sorry, May be i understood wrong can you tell me the full syntax how to do by putting loop
to condition you mentioned above.
how i can refer [received time] header to collection of mails.
item.headers("[RecieveTime"]) gives nothing

can anyone help?
@loginerror