Creating your own date variables

It is possible to create your own date variables, for example where a date is within the last six months, by using Diary Rules.

Create a new Diary Rule.

In this case the Description would be ‘Within the last 6 months’.

In the Which Date field select Event Date, which will default to the date that the query is executed.

In the Number field enter -6 (i.e. minus 6 as we are subtracting 6 (months) from the date that the query is executed).

In the Units field select Months.

Ok to save the record.

Edit the Diary Rule that you have just created.  You’ll see the the system has generated a Sequence.  Make a note of this number.

Create your query.  In this case we want to view absences within the last 6 months.  Our criteria for this will be

Start Date
Greater Than or Equal To
<0123456789>

where 0123456789 is the 10 digit Diary Rule Sequence.