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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit GuptaRank #190 · 12.8K reputationPosted Nov 11, 2016, 1:09 AM EST
viv verma154 reputationPosted Nov 11, 2016, 1:20 AM EST
DateTime dt = string.IsNullOrEmpty(txtStatusDate.Text) ? DBNull.Value : txtStatusDate.Text;
Amit GuptaRank #190 · 12.8K reputationPosted Nov 11, 2016, 8:20 AM EST
Manas MohapatraRank #182 · 13.2K reputationPosted Nov 11, 2016, 6:34 PM EST