Develop > Operational Reports Guide > Appendix A: Date Range Definition

Date Range Definition

You are required to import predefined date range values to the Reference Condition Parameter in Add the Reference Condition parameter. The table below provides the description and formulas of the imported date ranges.

Note The description in the table is based on the assumption that today is the reference date.

Date Range Function

Function Definition

Pseudo Formula

Aged 0 to 30 days

30 days ago to today

(d - 30) To d

Aged 31 to 60 days

60 days ago to 31 days ago

(d - 60) To (d - 31)

Aged 61 to 90 days

90 days ago to 61 days ago

(d - 90) To (d - 61)

All dates from today

Starting from today

>= d

All dates from tomorrow

Starting from tomorrow

>= (d + 1)

All dates to today

All days prior to today (included)

<= d

All dates to yesterday

All days prior to yesterday (included)

<= (d - 1)

Calendar 1st half

The first half of the year

(Year(d), 1, 1) To (Year(d), 6, 30)

Calendar 2nd half

The second half of the year

(Year(d), 7, 1) To (Year(d), 12, 31)

Calendar 1st quarter

The first quarter of the year

(Year(d), 1, 1) To (Year(d), 3, 31)

Calendar 2nd quarter

The second quarter of the year

(Year(d), 4, 1) To (Year(d), 6, 30)

Calendar 3rd quarter

The third quarter of the year

(Year(d), 7, 1) To (Year(d), 9, 30)

Calendar 4th quarter

The fourth quarter of the year

(Year(d), 10, 1) To (Year(d), 12, 31)

Last 1 day

One day ago to today

(d - 1) To d

Last 7 days

Seven days ago to today

(d - 6) To d

Last 4 weeks to Sunday

The Monday four weeks ago to Sunday of this week

(d - 27 - (Weekday(d) - 1)) To (d - (Weekday(d) - 1))

Last full month

The first day of last month to the last day of last month

DateSerial (Year(d), Month(d) - 1, 1) To DateSerial (Year(d), Month(d), 1 - 1)

Last full week

Sunday to Saturday of last week

(d - 6 - Weekday(d)) To (d - Weekday(d))

Last year month to date

The first day of the same month but last year to the same day of last year

Year(d) - 1, Month(d), 1) To DateAdd("yyyy", -1, d)

Last year to date

January 1 of last year to the same day of last year

(Year(d) - 1, 1, 1) To DateAdd("yyyy", -1, d)

Month to date

The first day of this month to today

(Year(d), Month(d), 1) To d

Quarter to date

The first day of this quarter to today

m = Month(d)

1<= m <=3 (Year(d), 1, 1) To d

4<= m <=6 (Year(d), 4, 1) To d

7<= m <=9 (Year(d), 7, 1) To d

10<= m <=12 (Year(d), 10, 1) To d

Next 30 days

Today to the next 30th day

d To (d + 30)

Next 31 to 60 days

The next 31st day to the next 60th day

(d + 31) To (d + 60)

Next 61 to 91 days

The next 61st day to the next 91st day

(d + 61) To (d + 90)

Next 91 to 365 days

The next 91st day to the next 365th day

(d + 91) To (d + 365)

Over 90 days

All days prior to 90 days ago

<= (d - 91)

Week to date from Sunday

Sunday of this week to today

(d- (Weekday(d) - 1)) To d

Year to date

January 1 of this year to today

(Year(d), 1, 1) To d