Convert Date MMDDYY to Date for database Insert
<p>I got an array with a date set as <code>071712</code> . no / slash characters for the date, no dash. nothing, just plain   <code>071712</code> (coming from a text file).</p>

<p>I need to convert the date so I can include it in a SqlServer insert statement. I'm calling a stored procedure for the insert. So far I have this:</p>

<pre><code>// This is not working so far.
DateTime  date = Convert.ToDateTime(fileLines[4]);
</code></pre>

<p>(date will be used as a parm for the stored procedure)</p>
