span <- new_interval(as.POSIXct("2009-01-01"), as.POSIXct("2010-02-02 01:01:01")) #interval
# 2009-01-01 CST--2010-02-02 01:01:01 CST
as.period(span)
# 1 year, 1 month, 1 day, 1 hour, 1 minute and 1 second
Run the code above in your browser using DataLab