If you want to have only date you can use
DateTimeFormatInfo
and set the date pattern you want and then insert it into database.
public DateTime StringToDate(string date)
{
DateTime dt = new DateTime();
DateTimeFormatInfo format = new DateTimeFormatInfo();
format.ShortDatePattern = "dd/MMM/yyyy";
try
{
dt = DateTime.Parse(date, format);
}
catch (Exception e) { }
return dt;
}
cmd.Parameters.AddWithValue("@discharge_date", SqlDbType.Date).Value = StringToDate(maskedTextBox1.Text);