finding difference between 2 dates stored in day,month,dd,yyyy
<p>I have used DATEDIFF function but since it requires yyyy/mm/dd this code is giving wrong value ,because i have stored date from date time picker in this formate day,month,dd,yyyy </p>

<pre><code>    private void button3_Click(object sender, EventArgs e)
    {
        DataSet ds = new DataSet();
DataSet ds1 = new DataSet();
DataSet ds2 = new DataSet();
DBHandling db = new DBHandling();

db.GetDataset(" select JoiningDate from Emp where name = '" + textBox2.Text + "'", ref ds);
db.GetDataset(" select LeavingDate from AddDate where name = '" + textBox2.Text + "'", ref ds1);

string date1, date2;
date1 = ds.Tables[0].Rows[0][0].ToString();
date2 = ds1.Tables[0].Rows[0][0].ToString();
db.GetDataset("select DATEDIFF(day,2008/1/15,2008/1/12) ", ref ds2);
textBox5.Text = ds2.Tables[0].Rows[0][0].ToString();
    }
</code></pre>

<p>so how should i do this so that i will  gate right Difference between 2 dates i.e number of days between 2 dates,thanks in advance</p>
