How to extract only Date from the received email

Hi,

I want to extract only the date from the result of item.Headers(“Date”)
How can we do it?
This is needed as in the flow I am checking a condition of the system date equals the email date in the format mm-dd-yyyy

image

Hi @anshulagarwal,
Check this…

Regards
Balamurugan

I tried but I get the below error message

image

newdatevalue=DateTime.ParseExact(emaildate.ToString,“MM-dd-yyyy hh:mm:ss”,Globalization.CultureInfo.InvariantCulture).ToString(“MM-dd-yyyy”)

newdatevalue is of type string

Thanks,
Anshul

Also, I tried changing the emaildate type to DateTime but in that case it gives the below error message

image

Hi @anshulagarwal,
Check this project.

File :
Extract only Date from the received email.zip (2.0 KB)

Regards
Balamurugan

2 Likes

@balupad14 Thanks this worked :slight_smile:

1 Like