I have a csv file with a datetime column
> head(GU$`Local time`)
[1] "2021-01-11 00:00:00 GMT" "2021-01-11 00:01:00 GMT"
[3] "2021-01-11 00:02:00 GMT" "2021-01-11 00:03:00 GMT"
[5] "2021-01-11 00:04:00 GMT" "2021-01-11 00:05:00 GMT"
And I want to create a boolean column returning TRUE if time is in a certain interval and FALSE otherwise .
I defined the start and end time :
StartPreLondonInterval <- as.POSIXct("05:05:00", "%H:%M:%S", tz = "Europe/London")
EndPreLondonInterval <-as.POSIXct("07:59:59", "%H:%M:%S", tz = "Europe/London")
But they return me not just the time, but the current day to, I want just the time :
> StartPreLondonInterval
[1] "2021-01-27 05:05:00 GMT"
Anyones now how can I do that ?
I was thinking that after the interval would be checked with interval() function from lubridate package .
question from:
https://stackoverflow.com/questions/65925355/how-to-find-an-interval-in-csv-datetime 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…