How to convert date format month name should change to english

Hi Team,

I have germen format date month is there , i want to convert to english,

January - januari
June-juni
May-mei
Augest- augustus

I received date format is 18 januari 2024

I need to convert 2024-18-01(year-date-Month)

I tested for below solution but worked only for Juni, I need all 12 month

Error is :" String 17 maart 2024 was not recognized as a valid DateTime"

Regards,
Raja G

Hi @Raja.G

Try this

DateTime.ParseExact(Input, "dd MMMM yyyy", New System.Globalization.CultureInfo("nl-NL")).ToString("yyyy-dd-MM")

Regards,

1 Like

Hi @lrtetala,

Thanks working as expected.

Regards,
Raja G

1 Like

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