I have a webform and if user doesn't select any date from the form then it will send null in the database,i am using typed datasets.
Is there a way to store null in smalldatetime format, because when i try to do it using my code it give me exception
if (d == "")
d = null;
int i = studentTable.InsertStudent(txtName.Text, Convert.ToDateTime(d));
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.