meenakshi_joshi09
February 10th, 2006, 02:57 AM
hi,
i am trying to insert date in database through a variable 'date1'. i have a textbox 'txtdateofbirth' and using following code to convert value of textbox
in correct date format :
DateTime date1;
date1 = Convert.ToDateTime(txtDateOfBirth.Text);
it's working nicely, but in database time as 12:00:00 AM is also inserting with date (for ex. 2/8/1983 12:00:00 AM). i do not want to insert time with date.
can anybody solve my problem?
i am trying to insert date in database through a variable 'date1'. i have a textbox 'txtdateofbirth' and using following code to convert value of textbox
in correct date format :
DateTime date1;
date1 = Convert.ToDateTime(txtDateOfBirth.Text);
it's working nicely, but in database time as 12:00:00 AM is also inserting with date (for ex. 2/8/1983 12:00:00 AM). i do not want to insert time with date.
can anybody solve my problem?