title: How do I convert dd/mm/yyyy hh:mm:ss to dd-mm-yy hh:mm in R?
body: <p>I have dataframe with timestamp as character type in the format <code>dd-mm-yyyy hh:mm</code>,<br>
  for example:  </p>
  
  <pre><code>"05-02-2018 06:30"
  </code></pre>
  
  <p>I need output in the format of <code>mm-dd-yyyy hh:mm</code>, i.e.:  </p>
  
  <pre><code>"02-05-2018 06.30"
  </code></pre>
  
  <p>I tried lubridate library with function mdy() and also as.POSIXct<br>
  but its not working for all of the records -<br>
  for few its throwing warning message <code>"failed to parse."</code> and<br>
  it is mostly for dates where <strong><em>day is > 12</em></strong>, for example:  </p>
  
  <pre><code>"19-06-2017 16:30"
  "22-10-2017 11:45"
  "14-09-2017 16:00"
  </code></pre>