0

I am working on a script in R

Currently my dates are formated as int and are in this format "%Y%m%d" i.e. 20200124

How do i change them to 24012020? How do i change them to 2020-01-24?

Phil
  • 7,287
  • 3
  • 36
  • 66
  • You can use `format` i..e `format(as.Date('20200124', '%Y%m%d'), '%d%m%Y')` the second format is already the default format from `as.Date` output – akrun Apr 21 '21 at 18:03
  • `format(as.Date('20200124', '%Y%m%d'), '%Y-%m-%d")` – Onyambu Apr 21 '21 at 18:05

0 Answers0