I have tried to split date-time column of this format 2019-05-01T08:00:00+00:00 into two columns 'Date' and 'Time' to no avail. Column name is YearTime and I have coded it as follows:
df$Date <- as.Date(sf$YearTime)
df$Time <- format(as.POSIXct(df$YearTime), format = "%H:%M:%S")
Below is what I get:
YearTime Date Time
2019-05-01T08:00:00+00:00 2019-05-01 00:00:00
2019-05-01T08:15:00+00:00 2019-05-01 00:00:00
I don't need 00:00:00 under the 'Time' column, instead i need the following format:
YearTime Date Time
2019-05-01T08:00:00+00:00 2019-05-01 08:00:00
2019-05-01T08:15:00+00:00 2019-05-01 08:15:00
FYI, the 'Time' column has 15-minute interval. Any idea of how I can achieve this?