Report Queues, Adding Date Expressions

Date Values

Crucial to the successful operation of Report Queues is making sure the Report runs as at the correct date, or has the correct date range selected. This can be controlled by using one of several special codes for the value or even using a date calculation for the value. Often there can be more than one way of creating these Date Expressions and the following are some examples.

Date Functions

FunctionParametersDescription
AgeAge(dateOfBirth, dateAsAt)Returns the age in years as calculated from dateOfBirth to dateAsAt or the current date if omitted.
BomBom(date)Returns the date as at the beginning of the month.
DateDate(year, month, day)Returns a date.
DateAddDateAdd(interval, value, date)Returns a date.
DateSerialDateSerial(year, month, day)Returns a date. (This is exactly the same as the Date function.)
DayDay(date)Returns the day of the month, a number from 1 to 31.
EomEom(date)Returns the date as at the end of the month.
EompEomp(date)Returns the date as at the end of the previous month.
HourHour(date)Returns the hour as a number from 0 (12 A.M) to 23 (11 P.M).
MinuteMinute(date)Returns the minute as a number from 0 to 59.
MonthMonth(date)Returns the month as a number from 1 (January) to 12 (December).
MonthNameMonthName(month, abbreviate)Returns the name of the month.
NowNow()Returns the current date and time.
SecondSecond(date)Returns the second as a number from 0 to 59.
YearYear(date)Returns the year as a number.

Date Examples

Date As AtExpression
Today's dateNow()
YesterdayNow()-1
End of the current MonthEOM(Now())
First day of the current MonthBom(Now())
First day of the previous MonthDate(Year(Now()), Month(Now())-1, 1)
End of the previous MonthDateAdd("Day",-1,Date(Year(Now()),Month(Now()),1))

Date Range Examples

Date FromDate ToExpression
7 days agoTodayDateAdd("D", -7, Now())|Now()
Beginning of this MonthTodayBOM(Now())|Now()
Beginning of the previous MonthEnd of the previous Month

3 x examples as follows:

  • Date(Year(Now()), Month(Now())-1, 1)|Date(Year(Now()), Month(Now()), 1)-1
  • BOM(DateAdd("M",-1,Now()))|EOM(DateAdd("M",-1,Now()))
  • BOM(DateAdd("M",-1,Now()))|BOM(Now())-1
TodayNow()|