Stuck on project with as.POSIXlt.character() error please help!

I'm working on my capstone for my Google DA certificate and am currently stuck on a certain spot. Here is my input:
all_trips_v2 %>%
mutate(weekday = wday(started_at, label = TRUE)) %>%
group_by(member_casual, weekday) %>%
summarise(number_of_rides = n(),average_duration = mean(ride_length)) %>%
arrange(member_casual, weekday)
and I get this error:
Error in mutate():
:information_source: In argument: weekday = wday(started_at, label = TRUE).
Caused by error in as.POSIXlt.character():
! character string is not in a standard unambiguous format
Run rlang::last_trace() to see where the error occurred.

I've delt with this error in a different scenario and was able to find a solution, but I'm not getting the same luck this time. Thanks for any input!

Your column named started_at is characters and you need to convert it using as.POSIXct() or one of the functions from lubridate. I can't tell exactly what you should do without knowing the format of the dates. If they are in m/d/y format, use mdy() and if they are in d/m/y format, use dmy(). If they include times, use thte version of the function with _hms or _hm appended to the name.

The current format is m/d/y with time ("4/1/2019 0:02"), what do I need to convert it to? This is my first time doing a full project and I'm still trying to learn the proper way of doing things.

Nvmnd I understand now, thank you for the help.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.