Skip to main content
OCLC Support

Relative dates

Learn how to apply relative dates to reports in Report Designer.

Relative dates allow you to create reports that you can run periodically without needing to alter your query. A relative date is a period of time that is relative to the current date (last week, last month, etc.). 

 Note: Relative date functionality is only available with Report Designer.

Apply relative dates to a standard report

  1. From the open report, click Design to display the report in Design mode.
  2. Click the Edit Data Provider button (Edit Data Provider button).
  3. From the Query Panel, locate the data object in the Query Filters panel.
  4. Select Prompt from the Define filter type drop-down menu, and then click the Show prompt properties button (Show Prompt Properties button).
    Example
    Relative dates drop-down menu
  5. From the Prompt Properties window, select Parameter from universe.
  6. Select a universe parameter and then click OK. See below for list of available universe parameters.
  7. If the date object is a range, repeat steps 4 through 6 for the To date.
  8. Select Apply Changes and Close from the Close drop-down menu.
  9. Save the report.

Apply relative dates to a custom report

  1. From the Query Panel, add a date object to the Query Filters panel.
  2. Select Prompt from the Define filter type drop-down menu, and then click the Show prompt properties button.
  3. Click the Show prompt properties button (Show Prompt Properties button).
  4. From the Prompt Properties window, select Parameter from universe.
  5. Select a universe parameter and then click OK. See below for a complete list of available universe parameters.
  6. If the date object is a range, repeat steps 2 through 5 for the To date.
  7. Select Apply Changes and Close from the Close drop-down menu.
  8. Save the report.

Available relative dates

 

Name Definition
Yesterday morning 12:00:00 AM institution's local time on the day before the current day.
This morning 12:00:00 AM institution's local time on the current day.
Beginning of last week 12:00:00 AM institution's local time on the first day (Sunday) of the week before the current week.
Beginning of this week 12:00:00 AM institution's local time on the first day (Sunday) of the current week.
7 Days Ago 12:00:00 AM institution's local time 7 days before the current day.
30 Days Ago 12:00:00 AM institution's local time 30 days before the current day.
60 Days Ago 12:00:00 AM institution's local time 60 days before the current day.
90 Days Ago 12:00:00 AM institution's local time 90 days before the current day.
Beginning of this month 12:00:00 AM institution's local time on the first day of the current month.
Beginning of last month 12:00:00 AM institution's local time on the first day of the month before the current month.
2 Months Ago 12:00:00 AM institution's local time on the first day of the month that started 2 months before the current month.
3 Months Ago 12:00:00 AM institution's local time on the first day of the month that started 3 months before the current month.
6 Months Ago 12:00:00 AM institution's local time on the first day of the month that started 6 months before the current month.
9 Months Ago 12:00:00 AM institution's local time on the first day of the month that started 9 months before the current month.
12 Months Ago 12:00:00 AM institution's local time on the first day of the month that started 12 months before the current month.
Beginning of this year 12:00:00 AM institution's local time on January 1 of the current year.
Beginning of last year 12:00:00 AM institution's local time on January 1 of the year before the current year.
2 Years Ago 12:00:00 AM institution's local time on January 1, 2 years ago.