Evaluation of symbolic dates

You can use symbolic dates for values of Date and DateTime properties in reports. Some symbolic dates identify a single day, such as Yesterday or Tomorrow. Other symbolic dates define a period (an inclusive range of dates), such as Current Month or Previous Quarter.

When evaluated, a symbolic date can produce a single day or a pair of days, depending on the operation in the Condition field.

  • When the condition is IS EQUAL TO, the evaluation returns both the starting day and ending day, defining an interval. (For the symbols Yesterday, Today, and Tomorrow, the range is 1 day long.)
  • When the condition is IS GREATER THAN or IS GREATER THAN OR EQUAL TO, the evaluation returns the starting date.
  • When the condition is IS LESS THAN or IS LESS THAN OR EQUAL TO, the evaluation returns the ending date.

All dates are computed relative to the current day in the time zone of the user, and not the time zone of the server. So, a user in London, who is working just after midnight, may find that the symbolic date Today is January 1, 2010, but at the same moment, on the same server, a user in California finds that Today evaluates to December 31, 2009. These results are irrespective of whether the server is located in California, England, or in any other time zone.

Example

In this example, you want to include in a report only operators who signed on during the current month. When running the report on October 16, you can enter October 1 as a starting date and October 31 as an ending date. But if you want to run the report again in November, you have to enter November 1 and November 30.

Instead of manually entering the starting date and ending date each time you run the report, you can use the symbolic date Current Month and run the report at any time.

For a detailed example, see the Pega Community article How to use symbolic dates in report selection criteria.

Note:
  • Through field value rules, your application can localize the English names of the symbols to present the symbolic date names in another language. Create field value rules that have Embed-ReportingPeriod as the first key part and pySymbolName as the second key part.
  • This feature depends on two standard Declare Expression rules with Rule-Obj-Report- as the Applies To key part, to compute the value of target properties pyStartingDate and pyEndingDate.