title: Excel ODBC Import from MySQL
body: <p>I have an excel import from ODBC setup using MSQuery and all of the data and rows I want are being returned fine there however when I send the data to my excel workbook I am missing 3 fields day, month &amp; year Can anyone help find out why?</p>
  
  <pre><code>SELECT  contract_0.create_date AS 'Submitted Date', 
          -- abbreviating
          contract_0.install_date AS 'installed_US', 
          RIGHT(contract_0.install_date,2) AS 'day', 
          MID(contract_0.install_date,6,2) AS 'month',
          LEFT(contract_0.install_date,4) As 'year'
              -- abbreviating
  FROM `web54-reiga-gms`.contact contact_0, `web54-reiga-gms`.contract contract_0, `web54-reiga-gms`.user user_0
  WHERE contract_0.contact_id = contact_0.id AND contract_0.user_id = user_0.id
  </code></pre>
  
  <p>My MSQuery Code above</p>
  
  <p>*<strong><em>EDIT *</em>*</strong></p>
  
  <p>I am using Excel 2010 on Windows 7 and MySQL ODBC 3.5</p>
  
  <p><em><strong></em> UPDATE <em>*</em>*</strong></p>
  
  <pre><code>CREATE TABLE `contract` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `user_id` int(11) NOT NULL,
    `installer` varchar(50) DEFAULT NULL,
    `fitter` varchar(50) DEFAULT NULL,
    `guarantee_no` varchar(50) DEFAULT NULL,
    `contact_id` int(11) DEFAULT NULL,
    `equipment` varchar(32) DEFAULT NULL,
    `certificate_no` varchar(50) DEFAULT NULL,
    `install_date` date DEFAULT '0000-00-00',
    `create_date` date DEFAULT '0000-00-00',
    `edit_date` date DEFAULT '0000-00-00',
    `edited_by` int(11) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
  </code></pre>