converting datetime
<p>i want to convert Datetime. I don't know how to do this? It gives errors. nvarchar doesn't convert to datetime.</p>

<p>startDate format : "11.03.2012"</p>

<p>My table :
STARTDATE datetime
ENDDATE datetime </p>

<pre><code>public static int Insert(string startDate, string endDate)
{

    Conn c = new Conn();
    SqlParameter[] prms = new SqlParameter[]{
    new SqlParameter("@STARTDATE", DateTime.ParseExact(startDate,"DD MM YYYY",null)),
    new SqlParameter("@ENDDATE",  DateTime.ParseExact(endDate,"DD MM YYYY",null)),        
    };

    return Convert.ToInt32(c.getObjectSP("sp_Insert", prms));
}
</code></pre>
