Skip to content

InLast7Days - Built-in Date & Time Function

Purpose

Returns true if the specified date expression is in the last 7 days.

Syntax

InLast7Days(datetime)
Argument Required Description
datetime Yes Any valid date expression

Returns

Boolean

See also

Examples

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

Notes

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