Skip to content

InLastYearMTD - Built-in Date & Time Function

Purpose

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

Syntax

InLastYearMTD(datetime)

Arguments

Argument Required Description
datetime Yes Any valid datetime expression

Returns

Boolean

See also

Examples

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

Notes

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