Date and DateTime problem
<p>I am developing an application using ASP.NET (C#) and SQLServer 2008. In my database i have a field DepositDate and datatype is "DATE". On my data entry form i am taking dates using jquery datepicker and its returning date in textbox as dd/mm/yyyy format as per user requirement whereas i noticed in database its keeping date values as yyyy-mm-dd..i am confused.</p>

<p>While saving record i am getting not a valid date time as the only available conversion format is Convert.ToDateTime and my data requirement is DATE only.</p>

<p>Can anyone suggest solution how to deal with it.?</p>

<h2>here is the code</h2>

<pre><code>       DateTime thedate = DateTime.Parse(txt_IDate.Text);
       DateTime mdate = DateTime.Parse(txt_Mdate.Text);

       db.AddInParameter(cmd, "@SIssueDate", System.Data.DbType.Date);
       db.SetParameterValue(cmd, "@SIssueDate", thedate.ToShortDateString());

       db.AddInParameter(cmd, "@SMaturityDate", System.Data.DbType.DateTime);
       db.SetParameterValue(cmd, "@SMaturityDate", mdate.ToShortDateString());
</code></pre>
