HI All,
I need to convert the date from “October 19, 2024” to 19/10/2024.
Please help me on this.
thanks in advance.
HI All,
I need to convert the date from “October 19, 2024” to 19/10/2024.
Please help me on this.
thanks in advance.
Hi @naveen.s
Try this:
Input = "October 19, 2024"
Output = DateTime.ParseExact(Input.Replace(",",""), "MMMM dd yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")
Regards
originalDateString="October 19, 2024"
DateTime.ParseExact(originalDateString, "MMMM dd, yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")
please try this
DateTime.ParseExact(Input,"MMMM dd, yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")

cheers
You are using DateTime.ParseExact please use DateTime.Parse
DateTime.Parse(Input).ToString(“dd/MM/yyyy”)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.