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.
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.
Sanjeeb LenkaPosted Jul 15, 2013, 8:20 AM
try this code instead of that.
infoteacher.DOB=DateTime.ParseExact(dtpDob.Text,"MM/dd/yyyy hh:mm:ss tt",CultureInfo.InvariantCulture);
Bineesh ViswanathPosted Jul 15, 2013, 12:57 PM
Iftikar HussainPosted Jul 15, 2013, 8:30 AM
You can do like this
infoteacher.DOB=GeDateInMmDdYyyy(dtp.Text);
Regards,
Iftikar