These docs are for v1.0. Click to read the latest docs for v1.2.

YEARSAGO

Gets the number of years between the specified date and now.

Syntax

=YEARSAGO(date)

Arguments

ArgumentTypeDescription
dateDateThe date to use for calculation

Examples

The following examples assume the current date is January 2, 2020 at 12:00pm

=YEARSAGO("2019-01-01")1.0048163082437276
Gets the number of years from midnight January 1, 2019 to January 2, 2020 at 12:00pm

=YEARSAGO("2020-01-01")0.004816308243727595
Gets the number of years from midnight January 1, 2020 to January 2, 2020 at 12:00pm

=YEARSAGO("2020-01-03")-0.0005600358422939068
Gets the number of years from midnight January 3, 2020 to January 2, 2020 at 12:00pm