FormatException for inserting date into database
<p>I get the formatException whenever I try to insert a date in the database. </p>

<p>I converted a date into a string and attempted to insert into a database. I have tried all means but it is caught as an exception. Find the code below:</p>

<pre><code>$ DateTime date =  Convert.ToDateTime(rows["Limit_maturity_date"].ToString());
string newdate = date.ToShortDateString();//.Replace("/","");
DateTime dd = DateTime.ParseExact(newdate, "M/d/yyyy", CultureInfo.InvariantCulture);
queryString = "INSERT INTO Table (CODE, NUM, CCODE, LCODE, SACCODE, LIM, L_DATE)" +
                    " VALUES ('" + int.Parse(rows["code"].ToString()) + "','" + int.Parse(rows["number"].ToString()) + "','" + int.Parse(rows["Ccode"].ToString()) + "','" + int.Parse(rows["Lcode"].ToString()) + "','" + int.Parse(rows["Sacode"].ToString()) + "','" + int.Parse(rows["limit"].ToString()) + "','" + newdate "')";
</code></pre>
