-2

I want to convert my date format from 1/10/2017 to 2017-10-1 format using R. I tried using different methods as writhing a function or using Chron. I'm a beginner so any help would be appreciated.

note: if date is 1/8/2017 it should be converted to 2017-08-01

thanks in advance

Farha
  • 1
  • 2

1 Answers1

0

Try this

as.Date("1/10/2017", "%d/%m/%Y")
Prasanna Nandakumar
  • 4,295
  • 34
  • 63