title: Formatting factors as dates turns all dates into N/A
body: <p>I've imported a CSV into R with two columns: Date and No. of links discovered, the aim is to create a line graph showing the number of links built to a website. My CSV looks like this:</p>
  
  <pre><code>       Date| No.of.Links.Found|
  1| ï»¿2011-09-12|                 2|
  2|    2011-10-03|                 1|
  3|    2011-10-10|                 1|
  4|    2011-10-12|                 2|
  5|    2011-10-14|                 2|
  6|    2011-10-15|                 3|
  </code></pre>
  
  <p>(Not sure what those strange characters are, but they also appear in R.) </p>
  
  <p>However on importing the CSV, the date column is formatted as a factor. When I try</p>
  
  <pre><code>Links_Over_Time$Date&lt;-as.Date(Links_Over_Time$Date,format = "%y/%m/%d")
  </code></pre>
  
  <p>All date values are replaced with 'N/A'. </p>
  
  <pre><code>Date No.of.Links.Found
  1 &lt;NA&gt;                 2
  2 &lt;NA&gt;                 1
  3 &lt;NA&gt;                 1
  4 &lt;NA&gt;                 2
  5 &lt;NA&gt;                 2
  6 &lt;NA&gt;                 3
  </code></pre>
  
  <p>I've also tried:</p>
  
  <pre><code>Links_Over_Time$Date&lt;-as.POSIXct(as.character(Links_Over_Time$Date), format = "%y/%m/%d")
  </code></pre>
  
  <p>and same thing happens. I also tried</p>
  
  <pre><code>library(lubridate)
  Links_Over_Time$Date&lt;-ymd(Links_Over_Time$Date)
  </code></pre>
  
  <p>but I get "All formats failed to parse. No formats found." warning message.</p>
  
  <p>This CSV is an export from Microsoft SQL Server Management Studio.</p>