Manipulating the date


#1

Hello friends,
I extract the data from the email in Outlook:


The correct date extracted should be 05/06/2018 but it extracts the following:

How is it possible to switch the value of the day and month in the value of the date?
Thank you so much friends,
Camilla :slight_smile:


#2

Hi @CamiCat,

Day -> Convert.ToDateTime("06/06/2018").ToString("ddd")
month-> Convert.ToDateTime("06/06/2018").ToString("MM")

Regards,
Arivu


#3

Hi Camilla,

Try this:

convert.ToDateTime(“Your Date”).ToString(“dd/MM/yyyy”) <- Day/Month/Year (19/06/2018)
OR
convert.ToDateTime(“Your Date”).ToString(“MM/dd/yyyy”) <- Month/Day/Year (06/19/2018)

Cheers.