Dynamic Lists and Time Macros

Modified on Tue, May 9, 2023 at 9:15 AM

Time Macros

There are a set of macros that can be used to calculate past and future dates for use with Dynamic Student Lists.  These "time macros" allow you to create lists that locate prior or future events.

This page describes these "Time Macros" and how they can be used.

Fixed Date Macros

These are not really "fixed" but always take on specific dates:

  • TODAY
  • YESTERDAY
  • TOMORROW

Fixed Date Cycle Macros

In these macros the "X" must be replaced by the code for one of the school's Attendance Cycles.   Attendance Cycles are found on the Setup->School->School Parameters->Attendance Cycles screen.

  • START_OF_CYCLE_X - This allows you to look up an Attendance Cycle and use its start date.  E.g. ${START_OF_CYCLE_MP2}
  • END_OF_CYCLE_X - This allows you to look up an Attendance Cycle and use its end date.  E.g. ${END_OF_CYCLE_MP2}

Fixed Date Day of Week Macros

  • NEXT_DAY_SAT, NEXT_DAY_SUN, NEXT_DAY_MON, NEXT_DAY_TUE, NEXT_DAY_WED, NEXT_DAY_THU,  NEXT_DAY_FRI - Provides the date of the next identified day of the week.  E.g. ${NEXT_DAY_MON} gives the date of 'next Monday'.
  • PREV_DAY_SAT, PREV_DAY_SUN, PREV_DAY_MON, PREV_DAY_TUE, PREV_DAY_WED, PREV_DAY_THU,  PREV_DAY_FRI - Provides the date of the prior identified day of the week.  E.g. ${PREV_DAY_MON} gives the date of 'last Monday'.

Computable Date Macros

Computable date macros allow you to create lists that "float"a time period - X days in the past to X days in the future.  These let create lists that can look at a floating "window" of time.

TODAY Macros
  • TODAY+x - Provides the date for "Today" plus X days.  E.g. ${TODAY+90} - Ninety days from today.
  • TODAY-x - Provides the date for "Today" minus X days.  E.g. ${TODAY-90} - Ninety days in the past.
Day of Week Macros
  • NEXT_DAY_SAT+x - Provides the date of the requested day, x weeks in the future.  E.g. ${NEXT_DAY_TUE+2} gives the date for next Tuesday plus two weeks.  This works for all Day of Week macros:  NEXT_DAY_SUN, NEXT_DAY_MON, NEXT_DAY_TUE, NEXT_DAY_WED, NEXT_DAY_THU,  NEXT_DAY_FRI
  • PREV_DAY_SAT+x - Provides the date of the requested day, x weeks in the past.  E.g. ${PREV_DAY_TUE+2} gives the date for last Tuesday minus two weeks.  This works for all Day of Week macros:  PREV_DAY_SAT, PREV_DAY_SUN, PREV_DAY_MON, PREV_DAY_TUE, PREV_DAY_WED, PREV_DAY_THU,  PREV_DAY_FRI

 

Sample Dynamic List Using Time Macros

Here is a Dynamic List query that looks for students who have been added to a specific course within the last 14 days:


Note the "courseStatusDate" field being compared to the macro ${TODAY-14}.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article