Creating a sequence of dates with a special format
问题 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) 回答1: 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. strftime(seq(as.POSIXct("2020-07-23 10:20"), by = "1 day", length