R
RP
I am using SQL Server 2005 as backend. I have a Text Box that accepts
Date in the format dd-MM-yyyy. But when I attempt to insert a record,
an error is displayed: Cannot convert char to DateTime ....
Actually, when the text box has entry like 22-10-2005, it considers 22
as month whereas it is DD. How to convert the Text Box value to an
acceptable format.
I tried: DateTime.parse(txtDOB.Text,"dd-MM-yyyy")
It gives error.
Date in the format dd-MM-yyyy. But when I attempt to insert a record,
an error is displayed: Cannot convert char to DateTime ....
Actually, when the text box has entry like 22-10-2005, it considers 22
as month whereas it is DD. How to convert the Text Box value to an
acceptable format.
I tried: DateTime.parse(txtDOB.Text,"dd-MM-yyyy")
It gives error.