InAgedToDays - Built-in Date & Time Function¶
Purpose¶
Returns true if the passed date is between a number of days ago.
Syntax¶
InAgedToDays(datetime, int1 [, int2])
Arguments¶
| Argument | Required | Description |
|---|---|---|
datetime |
Yes | Any valid date expression |
int1 |
Yes | The maximum days ago |
int2 |
No | The minimum number of days ago. Default = 0 |
Returns¶
Boolean
See also¶
- Date
- DateAdd
- DateDiff
- DatePart
- DateValue
- DateSerial
- Day
- Hour
- InLast4WeeksToSunday
- InLast7Days
- InLastFullMonth
- InLastFullWeek
- InLastYearMTD
- InLastYearYTD
- InLeapYear
- Minute
- Month
- MonthName
- Now
- Second
- Time
- TimeSerial
- TimeValue
- WeekAgo
- Weekday
- WeekdayName
- Year
Example¶
Used in a Font Color function¶
If InAgedToDays({OrderHeader.Order_Date}, 30) Then
Return drBlack
Else
If InAgedToDays({OrderHeader.Order_Date}, 60, 31) Then
Return drYellow
Else
If InAgedToDays({OrderHeader.Order_Date}, 90, 61) Then
Return Rgb(205,140,0) // Orange
Else // Date is > 90 days ago
Return drRed
End
End
End
Used in a filter function¶
return InAgedToDays({OrderHeader.Order_Date}, 90, 61)
Notes¶
- When one or more of the arguments cannot be converted to the specified type a runtime error is generated.