library(lubridate)
## 
## Attaching package: 'lubridate'
## The following object is masked from 'package:base':
## 
##     date
startDate <- dmy("9-September-2019")
endDate <- dmy("18-May-2020")
endDate - startDate
## Time difference of 252 days
as.period(startDate %--% endDate)
## [1] "8m 9d 0H 0M 0S"