2
Answers

String was not recognized as a Valid DateTime

Ramco Ramco

Ramco Ramco

2y
804
1

Hi

In txtPaymentDate0.Text it is showing "07/05/2022 00:00:00". On below line it is giving above error

DateTime PaymentDate2 = DateTime.ParseExact(txtPaymentDate0.Text, "dd-MM-yyyy", System.Globalization.CultureInfo.InvariantCulture);

Thanks

Answers (2)