Skip to main content

Date Parameters for Ad Hoc and Scheduled Reports

Date parameters can be used in filters to limit the data selected by ad hoc and scheduled reports for the desired period. The table below lists variables for configuring sets of filters for common reporting periods like “This Week,” “This Month,” “This Quarter” and “This Year." Once a report is built using one of these sets of filters, it will return the results from the period you selected every time it runs. This significantly streamlines the process of creating scheduled reports by eliminating the need to change date filters every time.

Common Reporting Period Variables

Period From Example To Example Notes
Today TodayFRDateGE

10-09-2012

00:00:00.000

TodayTODateLE 10-09-2012 23:59:59.999  
Yesterday YesterdayFRDateGE 10-08-2012 00:00:00.000 YesterdayTODateLE 10-08-2012 23:59:59.999  
This Week (Calendar) ThisWeek1FRDateGE 10-07-2012 00:00:00.000 ThisWeek1TODateLE 10-13-2012 23:59:59.999 Sunday thru Saturday of the current week
This Week (Business) ThisWeek2FRDateGE 10-08-2012 00:00:00.000 ThisWeek2TODateLE 10-12-2012 23:59:59.999 Monday thru Friday of the current week
This Month ThisMonthFRDateGE 10-01-2012 00:00:00.000 ThisMonthTODateLE 10-31-2012 23:59:59.999  
This Quarter ThisQtrFRDateGE 10-01-2012 00:00:00.000 ThisQtrTODateLE 12-31-2012 23:59:59.999  
This Year – YTD ThisYTDFRDateGE 01-01-2012 00:00:00.000 ThisYTDTODateLE 10-09-2012 23:59:59.999  
This Year – EOY ThisYearFRDateGE 01-01-2012 00:00:00.000 ThisYearTODateLE 12-31-2012 23:59:59.999  
Last Week (Calendar) LastWeek1FRDateGE 09-30-2012 00:00:00.000 LastWeek1TODateLE 10-06-2012 23:59:59.999 Sunday thru Saturday of the last week
Last Week (Business) LastWeek2FRDateGE 10-01-2012 00:00:00.000 LastWeek2TODateLE 10-05-2012 23:59:59.999 Monday thru Friday of last week
Last Week (Last 7 Days) LastWeek3FRDateGE 10-02-2012 00:00:00.000 LastWeek3TODateLE 10-08-2012 23:59:59.999 Last seven calendar days ending yesterday
Last Month LastMonthFRDateGE 09-01-2012 00:00:00.000 LastMonthTODateLE 09-30-2012 23:59:59.999  
Last Quarter LastQtrFRDateGE 07-01-2012 00:00:00.000 LastQtrTODateLE 09-30-2012 23:59:59.999  
Last Year – EOY LastYearFRDateGE 01-01-2011 00:00:00.000 LastYearTODateLE 12-31-2011 23:59:59.999  

 

When you configure a set of filters for a reporting period using these date parameters, you must use a Date field with the HMDYYS or HYYMDS date/time format. (Note: You must use List View to see the format of the field.)

In the Filter pop-up window use one of these variables by pasting it into the Variable field.

EXAMPLE

In this example, we will configure a set of filters for the period "Last Month."

1. Right-click on the Date field and select Filter Values or drag the Date field into the filter area to automatically open the Filter configuration window.

2. To set the start date filter, select "Greater than or equal to" from the drop-down menu.

3. Click PROMPT and select "Prompt Using Text Input (Simple)."

4. In the Variable field, enter the appropriate parameter name from the table above, "LastMonthFRDateGE" and click OK. (Note: You can ignore the Prompt box when using parameters because there will be no autoprompt for the filter.)

5. Now let's create the End Date filter using the "To" date parameter for the same Period. Right-click on the Date field and select Filter Values or drag the Date field into the filter area to automatically open the Filter configuration window.

6. Select "Less than or equal to" from the drop-down menu.

7. Click PROMPT and select "Prompt Using Text Input (Simple)."

8. In the Variable field, enter the appropriate parameter name from the table above, "LastMonthTODateLE" and click OK. (Note: You can ignore the Prompt box when using parameters because there will be no autoprompt for the filter.)

When you run your report, it will automatically generate for the date or range of dates specified by the parameters you chose. When you schedule this report, the Scheduler will not prompt you for date parameter values; it will automatically run on the parameters you just specified.

Heading Label Variables

You can create a heading that corresponds to the date parameters of your report by pasting the appropriate variable from the list below into the header section of your report.

 

Period From Example

Notes

Today &TodayLabel

10/09/2016

 
Yesterday &YesterdayLabel 10/08/2016  
This Week (Calendar) &ThisWeek1Label 10/07/2016 - 10/13/2016 Sunday thru Saturday of the current week
This Week (Business) &ThisWeek2Label 10/08/2016 - 10/12/2016 Monday thru Friday of the current week
This Month &ThisMonthLabel 10/01/2016 - 10/31/2016  
This Quarter &ThisQtrLabel 10/01/2016 - 12/31/2016  
This Year – YTD &ThisYTDLabel 01/01/2016 - 10/09/2016  
This Year – EOY &ThisYearLabel 01/01/2016 - 12/31/2016  
Last Week (Calendar) &LastWeek1Label 09/30/2016 - 10/06/2016 Sunday thru Saturday of the last week
Last Week (Business) &LastWeek2Label 10/01/2016 - 10/05/2016 Monday thru Friday of last week
Last Week (Last 7 Days) &LastWeek3Label 10/02/2016 - 10/08/2016 Last seven calendar days ending yesterday
Last Month &LastMonthLabel 09/01/2016 - 09/30/2016  
Last Quarter &LastQtrLabel 07/01/2016 - 09/30/2016  
Last Year – EOY &LastYearLabel 01/01/2015 - 12/31/2015  

Was this article helpful?