YEARFRAC (PQL - xl)

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

  • Library: PQL \ Spreadsheet \ Date & Time
  • Compatibility: Any content (regardless of data source) in the Tabulate spreadsheet module
  • Solve: This function can be used with the Solve plug-in: both as part of the objective function and constraint functions

Syntax

YEARFRAC(start date, end date, OPTIONAL basis)

Function Arguments

Name

Description

Type

Optional

start date

Starting date (DateTime object)

StringOrNumber

end date

Ending date (DateTime object)

StringOrNumber

basis

Integer representing the basis for day count

Number

Y

Comments

This function is the same as the Microsoft Excel 'YEARFRAC' function - using the same inputs, logic and outputs.