Accessing the Current Date in a Report

From SmartWiki
Jump to: navigation, search

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

You will sometimes need to create reports that use the current year, month, or day. To build these types of criteria, you will need to use the Date/Time Translation setting, in conjunction with special criteria that retrieve the current date in a specified format.

1. Edit your report from the Reports window by clicking the Edit Report icon (ReportEditIcon2.png).

ReportListViews.png

2. Display the Report Builder.

3. Click the Date Comparison tab in the Report Builder Help section.

ReportBuilderHelp-DateComparison.png

These expressions are used in the criteria to automatically display dates

These functions are used to extract specific types of times from a date field. For example, the current year.

4. Modify the Date Criteria to look as follows:

Reps60.png

5. Build, save, and preview the report.

No records will be displayed as no employee was hired in the current year.

In order to return only records from today's date, enter the following MySQL command into the criteria field: =curdate(), as follows:

Todaysdateinreportbuilder.jpg




Previous.png Using a Date Range in a Report Creating Summary Reports Next.png