I have a lot of different dataframes with different informations, but all have in common a column with Datetime (2021-10-9 01:35:12). But I just need the information about hours, minute and seconds to work with....
I tried to to change the time format with: as.POSIXct((df$time), format = "%H:%M:%S") but this does not change anything.... Because I just started with r and don't know all the functions, can you help me? Is there any function for maybe extract just the H:M:S out of a datetime format?
Tx a lot you will save me a lot of time! Otherwise I have to do it manually
Even though these lubridate functions (hour() , minute(), ...) work on a character objects formatted as date-time, it is important to parse them in the proper POSIXt format as a first step.