Convert 24 December 2018 to 24/12/2018

Hi All,

I am getting an input value assigned to a variable like 24 December 2018.

Can we convert the above one to DD/MM/YYYY?

Thanks

@Pavan_Srikar
have a look here:

DateTime.ParseExact("24 December 2018", "dd MMMM yyyy", System.Globalization.CultureInfo.InvariantCulture).toString("dd/MM/yyyy")
2 Likes


here it is.
Date.Parse(“Your date”).ToString(“dd/MM/yyyy”)

1 Like

hey @ppr thanks for the solution tried using the above got some error on string not recognized as valid date time.but later fixed that too

thanks @nv08 it worked fine for me.

1 Like

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