title: Format Date in OleDB Query
body: <p>I'm trying to find a way to correctly format a Date in a SELECT statement that loads data from an old Visual Fox Pro Database. I need to do this so that I can load it into a CSV, then load it into MySQL, which takes the date format 'yyyy-MM-dd'.</p>
  
  <p>This is my query at the moment;</p>
  
  <p><code>var dbfCmd = new OleDbCommand(@"SELECT ct_id, ct_cmpid, ct_empid, ct_pplid, ct_cntid, ct_pplnm, ct_date, ct_time, ct_type, ct_doneby, ct_desc FROM contacts", dbfCon);</code></p>
  
  <p>I need to find a way to format the <code>ct_date</code> column. I've tried a number of ways so far, including using <code>FDATE</code> and <code>FORMAT</code>, but nothing has worked so far. I've looked through the supported commands for <code>OleDB</code> but still haven't come across anything.</p>
  
  <p>Can anyone inform me of the correct way to format the Date query so that I can import to MySQL?</p>