Answers for "was not recognized as a valid DateTime"

1

System.FormatException: 'String '09-03-2020' was not recognized as a valid DateTime.'

this.Text="22/11/2009";

DateTime date = DateTime.ParseExact(this.Text, "dd/MM/yyyy", null);
Posted by: Guest on May-29-2020
0

was not recognized as a valid DateTime

DateTime date = DateTime.ParseExact(this.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture);
Posted by: Guest on July-08-2021

Code answers related to "was not recognized as a valid DateTime"

Browse Popular Code Answers by Language