but not showing error while i select date lesser than 10.
My dataType is DateTime.
here is the error
please help me.
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
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 15, 2013, 4:20 AM EDT
try this code instead of that.
infoteacher.DOB=DateTime.ParseExact(dtpDob.Text,"MM/dd/yyyy hh:mm:ss tt",CultureInfo.InvariantCulture);
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 15, 2013, 4:30 AM EDT
You can do like this
infoteacher.DOB=GeDateInMmDdYyyy(dtp.Text);
Regards,
Iftikar
Bineesh ViswanathRank #1,681 · 907 reputationPosted Jul 15, 2013, 8:57 AM EDT