title: Datetime conversion issue with SQL server
body: <p>I've generated some fake data for a database i've created using PowerAMC. This database as some filed with timedate format. But when i'm running the file in SQL server (Express edition), i've the following :</p>
  
  <pre><code>The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
  </code></pre>
  
  <p>The line concerned :</p>
  
  <pre><code>insert into INVENTORY (INVENTORY_ID, STATUS, START_DATE, COMPLETION_DATE) values (7, 'MAHSTDIV9', '1005-5-19 9:48:44', '1235-2-16 9:42:10')
  </code></pre>
  
  <p>So I think that the date format is not the expected one (maybe <strong>dd-mm-yyyy</strong> instead of what I have) but I dind't find out what I could do to prevent that.</p>
  
  <p>What I've done so far:<br>
  Try to convert the date </p>
  
  <pre><code>select CONVERT(DATETIME,'345-12-9 3:23:52',120) 
      -&gt; Conversion failed when converting date and/or time from character string.
  select CAST(CONVERT(VARCHAR(100),'345-12-9 3:23:52',120) AS datetime) 
      -&gt; The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
  </code></pre>
  
  <p>Do you have any idea about how to fix it ?</p>