Calculates the fraction of the year represented by the number of whole days between two dates.
Ta funkcja działa w Arkuszach Google tak samo jak w Excelu — ta sama składnia i argumenty.
YEARFRAC(start_date, end_date, [basis])The YEARFRAC function is used to identify the proportion of a year between a start date and an end date. It is commonly used to calculate accrued interest or other financial metrics that rely on time periods.
=YEARFRAC("2023-01-01", "2023-07-01", 1)Wynik: 0.49589
Calculates the fraction of the year for the first half of 2023 using the actual/actual basis.
It determines how the number of days in a year is calculated, which affects the final fraction.