Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Latest commit

 

History

History
20 lines (17 loc) · 859 Bytes

Date.IsInPreviousNYears.md

File metadata and controls

20 lines (17 loc) · 859 Bytes

Date.IsInPreviousNYears

Indicates whether this date occurs during the previous number of years, as determined by the current date and time on the system.

function (optional dateTime as nullable any, years as number) as nullable any

Description

Indicates whether the given datetime value dateTime occurs during the previous number of years, as determined by the current date and time on the system.

  • dateTime: A date, datetime, or datetimezone value to be evaluated.
  • years: The number of years.
  • Category

    Date

    Examples

    Determine if the year before the current system time is in the previous two years.

    Date.IsInPreviousNYears(Date.AddYears(DateTime.FixedLocalNow(), -1), 2)
    

    true