Algosim documentation: YearsBetween

YearsBetween

Computes the approximate number of years between two points in time.

Syntax

Description

If t and s are DateTime structures or timestamps, then YearsBetween(t, s) returns the (in general non-integral) approximate number of years between t and s, irrespective of the order of t and s, based on the assumption that one year is 365.25 days.

Examples

YearsBetween(date(1980, 05, 20), date(2000, 05, 20))
20