first my timestamp column was correct like this:
timestamp <dttm 2019-11-02 00:25:00. But i dont want the seconds, so i deleted them with:
df$timestamp <- format(df$timestamp,format= "%Y-%m-%d %H:%M")
it worked, but changed my timestamp to a character: timestamp <chr "2019-11-02 00:00"
I tried converting it back as a dttm with the correct format given:
df$timestamp <- format(as.POSIXct(timestamp), '%Y-%m-%d %H:%M')
but i get the following error: Error in as.POSIXct.default(timestamp) : do not know how to convert 'timestamp' to class “POSIXct”
I need my timestamp without seconds as dttm. Does someone sees where i am going wrong ? any help is appreciated. Thankyou