Convert date from String format Month dd, yyyy to date

Hello Guys,

i need to convert a date, which i got with a substring, that is in the format e.g. August 20, 2019, to a date format that is recognised as a date and I can calculate with for example to dd.MM.yyyy.

Does anyone know how to do that?

Best,
Blerton

1 Like

Yah sure it’s like this
In_datestr = “August 20, 2019”
Then
Out_datestr = DateTime.ParseExact(in_datestr,”MMMM dd, yyyy”,System.Globalization.Cultureinfo.Invariantculture).ToString(“dd.MM.yyyy”)

Cheers @Blerton_Ismaili

2 Likes

Hi,

it doesn’t work i get this message; image

1 Like

Make sure that the output variable in a DateTime type. Then it will be working fine.

2 Likes

Fine
can i have the input string with the date in it
Cheers @Blerton_Ismaili

1 Like

were we able to get them now
cheers @Blerton_Ismaili

Processing: DatatimeConverter.zip…

"Convertir 20.08.2019 to "+DateTime.ParseExact(“20.08.2019”, “dd.MM.yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“MMMM d, yyyy”, new System.Globalization.CultureInfo(“en-US”))