I’m trying to convert a string to a date, but I get this error
This is my convert assing: Convert.ToDateTime(Datetime.ParseExact(ShortDate,“dd-MM-yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd.MM.yyyy”))
I’m trying to convert a string to a date, but I get this error
This is my convert assing: Convert.ToDateTime(Datetime.ParseExact(ShortDate,“dd-MM-yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd.MM.yyyy”))
Datetime.ParseExact(ShortDate,“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd.MM.yyyy”)
The problem was that my date was coming with a space "08/10/2023 "
I solved it by removing the space using modify text
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.