Navigation:  Formula Reference > Spreadsheet Formula Functions >

YEARFRAC

Previous pageReturn to chapter overviewNext page

 

This function returns the fraction of the year represented by the number of whole days between the start and end dates.

Syntax

YEARFRAC(startdate,enddate,basis)

Arguments

This function has these arguments:

Argument

Description

startdate

Starting date (DateTime object)

enddate

Ending date (DateTime object)

basis

[Optional] Integer representing the basis for day count (Refer to Day Count Basis.)

Remarks

This functions returns an error when start, end, or basis is invalid.

Data Types

Accepts numeric, string, DateTime object data for the date arguments and numeric data for the optional argument. Returns numeric data.

Examples

YEARFRAC(A1,A2,A3)

 

See Also

DATE

MONTH

TODAY

YEAR