I was wondering how I could create a sequence of dates in the following format: from "Jul 23 10:20"
to "Jul 30 10:25"
by "1"
day?
I tried the following without sucess:
seq.Date(as.Date("Jul 23 10:20"), as.Date("Jul 30 10:25"), length.out = 7)
I was wondering how I could create a sequence of dates in the following format: from "Jul 23 10:20"
to "Jul 30 10:25"
by "1"
day?
I tried the following without sucess:
seq.Date(as.Date("Jul 23 10:20"), as.Date("Jul 30 10:25"), length.out = 7)
To preserve times you should convert to actual date-times, from which it is easy to build a sequence increasing by 1 day at a time. You can use
strftime
to format this as you please.We can get the dates by converting to
Date
formatOr with
lubridate