To use Cognos product documentation, you must enable JavaScript in your browser.

Show Data for a Specific Time Period

Show data for a specific time period to associate a report with a business time period rather than the execution time. For example, you have a monthly report that you run at the beginning of each month, and you want the last business day of the previous month to appear rather than the day on which you run the report.

If the report functions AsOfDate() and AsOfTime() are added to the report, they will return a value based on the results of the As of Time Expression object. If the As of Time Expression object is not added to the report, these two functions return the date and time at which the report is run.

If the As of Time Expression object is added more than once in the report, the first occurrence of the object in the layout that returns a valid value is used.

Steps
  1. In the Insertable Objects pane, on the Toolbox tab , drag As of Time Expression to the report.

  2. Double-click As of Time Expression.

  3. In the Expression Definition box, type the expression that you want and click OK.

    The expression must return a date-time value.

    Tip: You can drag a function that returns a constant from the Constants folder in the Functions tab. You can then change the constant to the value that you want to use.

    If you do not specify a time, the default time 12:00:00.000 AM is used.