Hi do you happen to know how to extract date from outlook email using this process below?
Could someone help me out?
If Date < 7th of current month
Start date = 1st of previous month
End date = 20th of current month
Else If Date > 7th of current month
Start date = 1st of current month
End date = Last day of current month
Yoichi
(Yoichi)
March 10, 2023, 4:44am
2
Can you elaborate? Is this from body or header?
Regards,
This is what I did for the date and time. As you can see I this is hardcoded. Now I need it to be extract from the email.
Yoichi
(Yoichi)
March 10, 2023, 5:02am
4
My question is which date we should extract. Is it receivedDate in Mailheader or described in mail body?
Can you share screenshot of it if possible?
Regards,
Anil_G
(Anil Gorthi)
March 10, 2023, 5:06am
5
@jnarthan.g
Do you want to extract the emails between those start and end dates?
If so you can use the following filter
"[Received] >= '" + variablecontainingstartdate + " 00:00AM' AND [Received] < '"+ variablecontainingenddate + " 00:00AM'"
Those variables should contain only dates…if you want to include time then remove 00:00AM as well
Cheers
Yoichi
(Yoichi)
March 10, 2023, 5:09am
6
If you need to extract it from mail header, the following sample will help you.
Sample20230310-3Lv2.zip (3.1 KB)
Regards,
Hi there.
My apologies for the late reply.
It’s actually described in mail body.
Could you help me out with this ya ?
I really do could use some ideas and help.
Thanks and regards.
Yoichi
(Yoichi)
March 14, 2023, 3:41am
8
Hi,
Can you share sample of the mail body? And also if there is fixed string, can you share it?
In general, we can extract the date using Regex etc.
Regards,
As you can see the highlighted one is my own outlook mail.
If I am not wrong this is the mail body right ?
Regards.
Can you kindly show how can it be done.
Regards,
Yoichi
(Yoichi)
March 14, 2023, 3:54am
11
HI,
It’s date in header. Can you try as the following?
If you need date string of same format with the above, the following will work
CDate(currentItem.Headers("Date")).ToString("ddd d/M/yyyy h:m tt")
Regards,
Could you kindly send me this file for me to refer?
It would be more convenient to refer with the file.
Regards,
Thanks will get back to you on this matter.
And also could you help me out with this.
Could you share any ideas where I can extract few things from email. Meaning from the mail body.
The list that need to be extract from mail body are as below :
Subject
Received Date
Destination
Booking number
ETA
Identifier
Number of container and size
Regards,
Yoichi
(Yoichi)
March 14, 2023, 4:24am
15
HI,
As topic title should match its content (because it will help those who have same issue), it’s better to discuss the above matter in the following topic you already posted.
Hi everyone,
Can anyone share any ideas where I can extract few things from email. Meaning from the mail body.
The list that need to be extract from mail body are as below :
Subject
Received Date
Destination
Booking number
ETA
Identifier
Number of container and size
It would be really helpful if someone could help me out with this.
Regards,
Regards,
Oh didn’t know this. First time using this forum.
Alright thanks,
Regards,
However will this work with the screenshot I have send about the date and time
Yoichi
(Yoichi)
March 14, 2023, 4:40am
18
HI,
The above Main.xaml outputs date in each mail as the following. Give it a try.
Regards,
I tried doing this but it’s getting some error.
Note: This is an old version 2020 ya.
Thank you.
Regards,
Yoichi
(Yoichi)
March 14, 2023, 5:04am
20
HI,
Which type is mails variable? It should be List<MailMessage>
(From GetOutlookMailMessage)
And please set MailMessage at TypeArgument in ForEach.
Regards,