Measure Fractional Years

This component computes the fraction of the year of the difference between two dates, similar to the YEARFRAC function in Microsoft Excel.

The component outputs two columns:

- The "YEARFRAC" column contains the difference between the start date and the end date as a fraction, that is the number of whole days between the dates divided by the total days per year.

- The "Difference Value (in Months)" contains the same difference, but given in months.

Similarly to Microsoft Excel YEARFRAC function, the output measures depend on the “basis”, a parameter which controls how many days make a financial year.

Options

Start Date Column
The column contains the starting dates for the periods on which the fractional years have to be measured. The column type must be Date&Time via the “String to Date&Time” node. The date has to be provided, precise time and or the time zone are optional.
End Date Column
The column contains the ending dates for the periods on which the fractional years have to be measured. The column type must be Date&Time via the “String to Date&Time” node. The date has to be provided, precise time and or the time zone are optional.
YEARFRAC Basis: Day Count Convention
This parameter works exactly the same as in the Microsoft Excel YEARFRAC function. The value of basis (either 0, 1 or 2) controls which Day Count Convention should be used to measure financial years. Three options are available:%%00010%%00010Basis = 0: “US (NASD) 30/360” Day Count Convention%%00010Basis = 1: “actual/actual” Day Count Convention%%00010Basis = 2: “actual/360” Day Count Convention%%00010

Input Ports

Icon
A table with at least two Date&Time columns for the start and end date of time periods. Each row should describe a period in time for which fractional years can be measured.

Output Ports

Icon
Input data table with additional two columns: the measured fractional years and the same time difference measured in months.

Nodes

Extensions

Links