Saturday, 7 September 2013

Conversion from string "9/18/2013" to type 'Date' is not valid

Conversion from string "9/18/2013" to type 'Date' is not valid

i am developing a web app in asp.net 4.0 . on data entry screen i have an
check on contract expiry date , so i am using a if condition to check Is
contract has expired or not. this is my code
If dr_customer.Item("contract_T") < Me.txt_dateissue.Text Or
dr_customer.Item("contract_F") > Me.txt_dateissue.Text Then
Me.lab_error.Text = "Contract Expire"
Exit Sub
End If
contract_F is contract start date and contract_T is contract end date (i
am taking this data from database) and dr_customer is data reader
when i execute application and insert data i received this error
Conversion from string "9/18/2013" to type 'Date' is not valid

No comments:

Post a Comment