Convert timestamp format character to date

Hi there,
im a beginner. I have a huge data set of timestamp :
27.11.2018 11:23:41 +00:00
29.11.2018 05:23:41 +00:00
30.11.2018 07:23:41 +00:00

The data is character and i want to convert it to date. After that, i want to create a timeline with ggplot.

To convert, i try this
x<-as.Date(x, format='%d/%m/%Y:%H:%M:%S')
But, unfortunately it returns NAs as result.

Can someone help?

Your format string isn't right. Try as.Date(x, format = "%d.%m.%Y %H:%M:%S").

I see my error. It works now. Thanks! :slight_smile:

1 Like

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