Using a Date Range in a Report

caption Click here to watch a video on SmartSimple's integrated reporting subsystem.

You can also isolate a date range by using the same date field twice, and by utilizing the implied AND operator between columns to set a date range. In this example, you will apply this technique.

1. Create a copy of the Employee Start Date report named Employee Start Dates - Date Range.

2. Display the Report Builder and modify the report as shown below:

Reps57.png

This report will display all employees where the start date is greater than 1st January 2004 AND less than 31st of December 2005.

This report will not include employees hired on either January 1st or December 31st. If you needed to include these records, the criteria should be set to: >=’2004-01-01’ AND <=’2005-12-31’

3. Run the report and review the results.

4. Close the report.


MySQL commands can also be used in the report criteria to define a date range. The below example will delimit the report to records with a start date of today to seven days in the future, inclusive:

Weekrangeinreportbuilder.jpg




Previous.png Using Date Translation in Reports Accessing the Current Date in a Report Next.png