string was not recognized as valid Date Time using C#
<p>i have tried every possible solution online but can't figure out why i am still getting this error
"string was not recognized as valid Date Time"
the funny thing is that i am converting 2 date times, one is cell 3 in my gridview and the other one is cell 7 but the Cell 3 works fine and but Cell 7 does not want to convert and both of them are the same data types!!.  I am pulling these data from my sql server table and the data types are varchar but the format should be mm/dd/yyyy.<br>
I have tried this method but it did not work:</p>

<pre><code>foreach (GridViewRow gr in GridView1.Rows)
        {

            CheckBox cb = (CheckBox)gr.FindControl("chkItem");
            if (cb.Checked)
            {

                DateTime ExpectedSubDate = DateTime.Parse(gr.Cells[3].Text);
                DateTime strTargetDate = DateTime.ParseExact(gr.Cells[7].Text, "MM/DD/YYYY HH:MM:SS TT", System.Globalization.CultureInfo.InvariantCulture);  
</code></pre>

<p>I have also tried this method but did not work either</p>

<pre><code>DateTime strTargetDate = DateTime.Parse(gr.Cells[7].Text);
</code></pre>

<p>I have also tried this way but did not work either:</p>

<pre><code>DateTime strTargetDate = DateTime.ParseExact(gr.Cells[7].Text, "MM/DD/YYYY", System.Globalization.CultureInfo.InvariantCulture);
</code></pre>
