Split time from datetime

How can I split "16/03/2021 08:32" into time only with R?

tried using
format(as.POSIXct(bike_rides1$started_at), format = "%H:%M")
and it returned 00:00,
I also tried format(as.POSIXct(bike_rides1$started_at), format = "%H:%M:%S")
and it returned 00:00:00 as well.

Hi @Olufunke

It's because you didn't parse the date column properly, you need to indicate the date format in as.POSIXct.

The code below should work.

format(as.POSIXct(bike_rides1$started_at, format = "%d/%m/%Y %H:%M"), format = "%H:%M")

Thank you, it worked