title: R: convert date from character to datetime
body: <p>I have <code>df$date</code> as character type below:</p>
  
  <pre><code>     date
  1    "2016-04-10T12:21:25.4278624" 
  2    "2016-04-12T10:01:42.9573987" 
  3    "2016-04-12T10:02:15.2168753" 
  4    "2016-04-12T10:02:45.3005686"
  </code></pre>
  
  <p>I want to convert it to datetime object and tried <code>as.Date(df$date)</code> and the output is </p>
  
  <pre><code>"2016-04-10" 
  "2016-04-12" 
  "2016-04-12" 
  "2016-04-12"
  </code></pre>
  
  <p>I also tried <code>as.POSIXlt(df$date)</code> and the output is </p>
  
  <pre><code>"2016-04-10 BST" 
  "2016-04-12 BST" 
  "2016-04-12 BST" 
  "2016-04-12 BST"
  </code></pre>
  
  <p>What I am looking for is</p>
  
  <pre><code>     date
  1    2016-04-10 12:21:25.4278624 
  2    2016-04-12 10:01:42.9573987 
  3    2016-04-12 10:02:15.2168753 
  4    2016-04-12 10:02:45.3005686
  </code></pre>
  
  <p>I also tried the following from the <code>help</code> </p>
  
  <pre><code>as.POSIXct(strptime("2011-03-27 01:30:00", "%Y-%m-%d %H:%M:%S"))
  </code></pre>
  
  <p>The output is <code>NA</code></p>
  
  <p>How do I get the desired output?</p>