Convert any date format into ddmmyy

Hie there i have a query i have a date as examples 10/January/2022 i want to show this oput in 12/01/2022 how can i do that

Hi @Darkfighter ,

Try this:

CDate(“10/January/2022”).Tostring(“dd/MM/yyyy”)

1 Like

Hi @Darkfighter ,

Convert the String to Date using CDate. Then you can modify that converted date to your required format. Eg. CDate(< String Var >).toString(“dd/MM/yyyy”)

Hi @Darkfighter

Try this

DateTime.ParseExact("10/January/2022","dd/MMMM/yyyy",system.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")