Get received date Mail outlook?

I want to get received date Mail outlook.
Now I use item.Headers(“Date”)
It show output Tue, 21 Sep 2021 11:00:33 +0700

But I want output format dd/MM/yyyy

Please guide me about it.

Hi @Maria99

Try to use Below Expression

DateTime.ParseExact(Split("Tue, 21 Sep 2021 11:00:33 +0700","+")(0).TrimEnd,"ddd, dd MMM yyyy HH:mm:ss",System.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")

Regards
Gokul

1 Like

@Maria99

Try below expression.

            CDate(item.Headers(“Date”)).ToString("dd/MM/yyyy")
3 Likes

Hi

Hope this expression would help you resolve this

If you have the date In a string variable then use a assign activity like this

stroutput = DateTime.ParseExact(Split(Strinput.ToString,”:”)(0) ,“ddd, dd MMM yyyy HH”,system.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)

Cheers @Maria99

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.