Calculate Time Difference between Dates in R Programming – difftime() Function
difftime() function in R Language is used to calculate time difference between dates in the required units like days, weeks, months, years, etc.
Syntax: difftime(date1, date2, units)
date1, date2: Dates to calculate difference
units: Days, weeks, months, etc.
Time difference of 122 days Time difference of 17.42857 weeks
Time difference of 2928 hours Time difference of 175680 mins