0

still fairly new to r. I have searched through the forum on different solutions that don't work on the data set that i have and what output i'm trying to achieve.

I have a column containing dates in the format dd/mm/yyyy (WorkoutDay) and would like to format it to dd-mm-yyyy.

running as.date function through the column gives me this output:

## example date in on of the columns "20/03/2020"

rd$WokoutDay <- as.Date(rd$WorkoutDay)

##output  0031-03-20

I tried to run a format function through but I get this instead which is also not what I'm after.

rd$WorkoutDay <- as.Date(rd$WorkoutDay) %>%
  format("%d-%m-%y")

## output  20-03-31

I've read that maybe strptime or as.POSIXct might help but not sure how to use them

thanks in advance :)

BigBird
  • 5
  • 3

0 Answers0