I have a list of time as shown below:
"0:30:00" "1:00:00" "1:30:00" "10:00:00" "10:30:00" "11:00:00" "11:30:00" "12:00:00" "12:30:00" "13:00:00" "13:30:00" "14:00:00" "14:30:00"
When I used the as.Date function to convert these into date objects in R using the following code:
time1<-as.Date(time,format='%H:%M:%S')
It gave me the following output:
"2016-05-09" "2016-05-09" "2016-05-09" "2016-05-09" "2016-05-09" "2016-05-09" "2016-05-09" "2016-05-09" "2016-05-09" "2016-05-09" "2016-05-09" "2016-05-09"
Why is that the case? Is there something wrong with my code or the original time format?
Thanks.