When using R how can I subtract a number of days from a date-time with clock time written in the following way: 2013-06-13 08:24:00.
E.g. subtract one day from 2013-06-13 08:24:00 to obtain 2013-06-12 08:24:00.
When using R how can I subtract a number of days from a date-time with clock time written in the following way: 2013-06-13 08:24:00.
E.g. subtract one day from 2013-06-13 08:24:00 to obtain 2013-06-12 08:24:00.
library(lubridate)
x <- as.POSIXct("2013-06-13 08:24:00")
x - ddays(1) - dminutes(24)
#[1] "2013-06-12 08:00:00 EEST"