Is their any way to get current day emails if the date of email is coming as Thu, 29 Jul 2021 01:13:16 -0700 ?
I have tried below method but it is giving error as “System exception at initialization: String was not recognized as a valid DateTime. at Source: mscorlib”
Query Used -
GetMails.Where(Function(x) DateTime.ParseExact(x.Headers(“Date”), “ddd, dd MMM yyyy HH:mm:ss”,Nothing).Date.Equals(DateTime.Now.Date)).ToList
Need you suggestions.
Can you try
"ddd, dd MMM yyyy HH:mm:ss K" instead of
“ddd, dd MMM yyyy HH:mm:ss”?
Can you check the following document? (K Specifier section)
hi @ermanoj3101 - I always keep the below reference handy for date time formats…very useful…
Thanks @prasath17 , this is very useful.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.