Analytics - retrieving records based on criteria of "x days before today"
- Article Type: Q&A
- Product: Alma
Question
I'd like to schedule an automatic daily or weekly report of items
added to Alma in the past "x" time period - probably the past 30 days
Answer
Under filter, select the comparison (less than, greater than), than instead of choosing a value, select "More Options" and "SQL query", and use the following:
timestampadd(SQL_TSI_DAY, {x} ,CURRENT_DATE)
where {x} is the number of days forward or back (and usually you'll want back, so a negative number) number of days.
This sql can be used for months or years as well, by changing the SQL_TSI constant accordingly.
Category: Analytics
- Article last edited: 6/9/2014