title: How to convert datetime from character to normal datetime in R
body: <p>I have a dataframe in r which consists of a column with the following DateTime format with <code>character</code> class.</p>
  <pre><code>dt&lt;-2021-03-01 06:10:31.346
  </code></pre>
  <p>I need to convert it into the following format with datetime class.</p>
  <pre><code>2021-03-01 06:10:31
  </code></pre>
  <p>I have tried the following solution but it didn't work.</p>
  <pre><code>Df$Dt&lt;- as.POSIXct(Df$Dt,format=&quot;%Y-%m-%dT%H:%M:%S&quot;)
  </code></pre>