You can use the Date Difference function of the date function.
This function allows you to find the difference between two date-time values in a specified unit (days, months, years).
For example, to find the difference in years between the date-time values in two columns, "Start Date" and "End Date," create the following function:
The third argument, Year, can also be specified as Month or Day to represent the number of months or days.
The fourth argument, actual, indicates that you want the actual interval.
In addition, you can specify start (calculate the difference at the beginning of the period) and fractional (calculate the decimal part of the interval).
Date Difference 関数