It acts similiarly to Excel's DATEDIF function. It returns difference between two dates, either day,month or year, it's up to the user to specify which type of difference user wants.
Usage
DATEDIF(start_date, end_date, difference = "d")
Arguments
start_date
Start date to evaluate the difference
end_date
End Date to evaluate the difference
difference
What type of difference do you want? Year,Month or Day? Specify "m" for example for month/months, "d" for day/days and "y" for year/years.
Value
In these examples we have all 3 types of returns, first is difference between specified two dates in days, second one is difference in months and third one is difference in years.Function will always return numeric class.