string was not recognized as a valid datetime in asp.net
when date textbox leave blank then an error are shown string was not recognized as a valid datetime in asp.net
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manas MohapatraPosted Nov 11, 2016, 11:34 PM
Amit GuptaPosted Nov 11, 2016, 1:20 PM
viv vermaPosted Nov 11, 2016, 6:20 AM
DateTime dt = string.IsNullOrEmpty(txtStatusDate.Text) ? DBNull.Value : txtStatusDate.Text;
Amit GuptaPosted Nov 11, 2016, 6:09 AM