title: Importing date vector from Excel into R
body: <p>I'm reading an Excel spreadsheet into R, one of the columns contains dates in format </p>
  
  <pre><code>03-Jan-11
  07-Feb-11
  07-Mar-11
  07-Mar-11
  04-Apr-11
  </code></pre>
  
  <p>e.t.c</p>
  
  <p>However when imported into R using read.xlsx2 they become numeric:</p>
  
  <pre><code>40546
  40581
  40609
  40609
  </code></pre>
  
  <p>e.t.c.</p>
  
  <p>How can I convert the numeric dates into their old format?</p>
  
  <p>I have tried:</p>
  
  <pre><code>as.Date( dates, origin= "2011-01-03") 
  </code></pre>
  
  <p>However this gave error:</p>
  
  <pre><code>Error in charToDate(x) : 
    character string is not in a standard unambiguous format
  </code></pre>
  
  <p>and</p>
  
  <pre><code>as.Date(as.numeric(Directories$Insertion.Date),origin="2011/01/03")
  </code></pre>
  
  <p>Did not preserve the dates</p>
  
  <p>Does anyone know how I can do this in R</p>
  
  <p>Many thanks.</p>