title: how to remove last 3 letters from string including spaces in r
body: <p>I have following dataframe in r</p>
  
  <pre><code>  Date                    Count   
    2016-12-30 17:25:00      34
    2016-12-04 10:25:00      31
  </code></pre>
  
  <p>I want to change the format to following and want to remove seconds from Date</p>
  
  <p>Desired Dataframe would be</p>
  
  <pre><code>  Date                 Count
    30-12-2016 17:25     34
    04-12-2016 10:25     31
  </code></pre>
  
  <p>I am doing following but because of space inbetween date it is returning me wrong output</p>
  
  <pre><code> substr(df$Date,1,nchar(df$Date)-3)
  </code></pre>
  
  <p>How can I do it in R?</p>