title: R Time difference between 2 columns in milliseconds
body: <p>I have a dataset containing performance data. Column 1 contains the END_DATE and column 2 the START_DATE.
  The format of the datetime in both columns: 03-08-16 08:55:59,177000000
  I want to add a new column where the time difference in milliseconds is stored.</p>
  <p>Example:</p>
  <blockquote>
  <p>column 1: 03-08-16 08:55:59,177000000</p>
  <p>column 2: 03-08-16 08:55:59,888000000</p>
  <p>new column in seconds: 0,711</p>
  </blockquote>
  <p>I tried to convert to as.POSIX.. but somehow the milliseconds gets lost. There was an answer stating that the &quot;OS&quot; format option would do the trick but i wasn't succesfull:</p>
  <blockquote>
  <p>time = as.POSIXct(&quot;03-08-16 08:56:06,345000000&quot;, format=&quot;%d-%m-%y %H:%M:%OS&quot;)</p>
  <p>time</p>
  <p>[1] &quot;2016-08-03 08:56:06 CEST&quot;</p>
  </blockquote>
  <p>Thanks in advance!</p>