For example:
if I have
x <- "2016-11-23 16:22:03 IST"
y <- "2016-11-23 16:28:29 IST"
how can I calculate how much time has left between them?
For example:
if I have
x <- "2016-11-23 16:22:03 IST"
y <- "2016-11-23 16:28:29 IST"
how can I calculate how much time has left between them?
Try this:
x <- strptime("2016-11-23 16:22:03 IST", format = '%Y-%m-%d %H:%M:%S')
y <- strptime("2016-11-23 16:28:29 IST", format = '%Y-%m-%d %H:%M:%S')
y-x
#Time difference of 6.433333 mins