- Function DateDifferenceYearFraction(FirstDate, SecondDate, Basis)
DateDifferenceYearFraction
The function DateDifferenceYearFraction
calculates the year fraction
between two dates based on the specified day count basis.
DateDifferenceYearFraction(
FirstDate, ! (input) scalar string expression
SecondDate, ! (input) scalar string expression
[Basis] ! (optional) numerical expression
)
Arguments
- FirstDate
The first date must be in date format.
- SecondDate
The second date must be in date format, and later than FirstDate.
- Basis
The day-count basis method to be used. The default is 1.
Return Value
The function
DateDifferenceYearFraction
returns the difference between FirstDate and SecondDate in fractions of a year.
Note
The function DateDifferenceYearFraction
is similar to the Excel
function YEARFRAC
.
See also
Day count basis methods.