Skip to content

InLastYearYTD - Built-in Date & Time Function

Purpose

Returns true if the passed date falls in any date in the last year up to the current date last year. If the current date is 2023-12-08, any date passed that is between 2022-01-01 and 2022-12-08 is valid.

Syntax

InLastYearYTD(datetime)

Arguments

Argument Required Description
datetime Yes Any valid datetime expression.

Returns

Boolean

See also

Examples

Used in a Font Color function
If InLastYearYTD({OrderHeader.Order_Date}) Then
    Return drBlack
Else
    Return drRed
End
Used in a filter function
return InLastYearYTD({OrderHeader.Order_Date})

Notes

  • When the argument cannot be converted to a datetime value, a runtime error is generated.