How to convert string date from "dd.mm.yyyy" to "mm/dd/yyy"?

I have tried with dateSlash.ToString(“mm/dd/yyy”) but I get error:
image

1 Like

Hi @bp777 ,

Try this:


DateTime.ParseExact("16.03.2023", "dd.MM.yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo).ToString("MM/dd/yyyy")

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