Hi everyone, I need expression to get only today’s mail in if condition, suggest a expression. It would resolve my problem
Check the below thread
This will filter the mails that you have received today.
Regards
try this
inside loop Cdate(currentitem.Date) = Today
if linq then mails.Where(function(x) Cdate(x.Date) = Today)
if in filter in outlook activity then
"[ReceivedTime] >= '" + DateTime.Today.ToString("dd") + " 00:00AM'"
cheers
Use this in If Condition while iterating.
Cdate(currentMailMessage.Headers.Item("Date")).Date = DateTime.Now.Date
Thanks,
Ashok
1 Like
Try this:
CDATE(currentMailMessage.Headers.Item("Date")).ToShortDateString.Equals(DateTime.Now.ToShortDateString)
Hope it’ll helps you
Cheers!!
It’s working great
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.