Product:  Platform

Version:  All


To schedule a query that updates the date range automatically, the date(s) need to be dynamic and update based on the login date. 

The function to use for this purpose is called logindate(X) - documented here.

After 'logindate' you need to include a number in parentheses that represents the offset from GMT

EST's offset is -5. 

In order to run a report for the timeframe from date1 to date2, use the between() function (documented here) and the shift() function (documented here).

To shift the logindate backwards use negative numbers.

As an example, to select a date from yesterday to 30 days prior to yesterday you would use:

<sel value="between(date;shift(logindate(-5);-1);shift(logindate(-5);-30))"/>

Once you re-write your query using these "dynamic" dates, you will be able to schedule it and the query would always update the date range.