Microsoft office 365 Received Date from email

i’m using the get mail activity to get a list of received emails then using it in a for each activity to retrieve specific details like sender name, subject, date received etc. for date received i’m using .ReceivedDateTime.ToString which is working but the issue is that the date is in the format MM/dd/yyyy HH:mm:ss but I will like it to be dd/MM/yyyy HH:mm:ss. how can i do this?

@duaine.b

you can convert it

DateTime.ParseExact(ReceivedDateTime.ToString,"MM/dd/yyyy hh:mm:ss",System.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy hh:mm:ss")

or if receivedDateTime is in dateformat instead of string then ReceivedDateTime.ToString("dd/MM/yyyy hh:mm:ss")

Hi @duaine.b

Use this format
mail.ReceivedDateTime.ToString(“dd/MM/yyyy HH:mm:ss”)

Happy Automation

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