Relative Dates
You can filter information in your view based on a date range relative to the current system date. You can accomplish this
using date-based filters, and entering a text expression describing the relative date or date span you want to display, using the
format <Keyword>+/-<Number>.
- Keyword indicates the time span you want to use. Options include: DAY, MONTH, WEEK, QUARTER, SEMI, and YEAR.
- + or - indicates whether the time span occurs before or after the chosen date.
- Number indicates the number of the above-mentioned time spans you want to include in the filter.
For example, if you want to look at all Sales for the prior week, your expression would be: WEEK-1.
To create a relative date filter:
1. "Using Filters,"Â create a filter based on a date field. The filter appears in the Filters panel.
2. In the filter's operator, select the date comparison you would like to make.
3. In the filter's text entry box, enter an expression describing the relative date.
For instance, if you want to display all the sales numbers for the month prior to the current date, you would select "is on or after" as the operator and and in the second box you would enter MONTH-1.
(this would show you all results exactly a year prior to the date the report was run)
Another way to enter in the relative date:
- In the date field, click on the calendar icon.
- Click on "Relative Timestamp" and you will access the options on setting up a relative date.Â
- Click on "Close" once you are done setting the relative date.
The following values:
DAY
 - the date range will be calculated based on days relative to the current dateWEEK
 - the date range will be calculated based on weeks relative to the current dateMONTH
 - the date range will be calculated based on months relative to the current dateQUARTER
 - the date range will be calculated based on quarters relative to the current dateSEMI
 - the date range will be calculated based on semesters relative to the current dateYEAR
 - the date range will be calculated based on years relative to the current date
Optionally, the <keyword>
 may be followed by a + or a - sign and an integer number, representing the amount of time units. Some examples are in the following table:
Expression | Return Date |
---|---|
2000-01-23 | The day of January 23, 2000, starting at 00:00:00, ending at the same time |
DAY | All the current day, starting at 00:00:00, ending at 23:59:59 |
DAY-1 | Day of yesterday, starting at 00:00:00, ending at 23:59:59 |
DAY+1 | Day of tomorrow, starting at 00:00:00, ending at 23:59:59 |
WEEK | This week, starting* on Monday 00:00:00, ending on Sunday 23:59:59 |
WEEK+1 | Next week, starting* on Monday 00:00:00, ending on Sunday 23:59:59 |
WEEK-2 | 2 weeks ago, starting* on Monday 00:00:00, ending on Sunday 23:59:59 |
MONTH | This month, starting on the first day of month at 00:00:00, ending on the last day of month at 23:59:59 |
MONTH-6 | 6 months ago, starting on the first day of month at 00:00:00, ending on the last day of month at 23:59:59 |
MONTH+6 | 6 months later from now, starting on the first day of month at 00:00:00, ending on the last day of month at 23:59:59 |
QUARTER | this quarter, starting on the first day of quarter at 00:00:00, ending on the last day of quarter at 23:59:59 |
QUARTER-10 | 10 quarters ago, starting on the first day of quarter at 00:00:00, ending on the last day of quarter at 23:59:59 |
QUARTER+1 | Next quarter, starting on the first day of quarter at 00:00:00, ending on the last day of quarter at 23:59:59 |
SEMI | this semester, starting on the first day of semester at 00:00:00, ending on the last day of semester at 23:59:59 |
SEMI-3 | 3 semesters ago, starting on the first day of semester at 00:00:00, ending on the last day of semester at 23:59:59 |
SEMI+3 | 3 semesters later from now, starting on the first day of semester at 00:00:00, ending on the last day of semester at 23:59:59 |
YEAR | this year, starting on January 1, 00:00:00, ending on December 31, 23:59:59 |
YEAR-1 | last year, starting on January 1, 00:00:00, ending on December 31, 23:59:59 |
YEAR+10 | 10 years later from now, starting on January 1, 00:00:00, ending on December 31, 23:59:59 |
2024 DATABASICS, Inc