Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Mobile Operator

Day of Week

  • Last UpdatedMar 09, 2021
  • 2 minute read

This example shows a pair of Decision formulas that evaluate the day portion of the current date to determine the availability of their Tasks. Similar formulas using @DAYOFYEAR or @MONTH could be used to trigger Tasks, Actions, or set the Status of Task Groups, as well.

Both Condition formulae use the @DAYOFWEEK and @TODAY functions. In this example:

  • The "Monday Only Task" is available only on Mondays.

  • The "Tuesday Only Task" is available only on Tuesdays.

The simplest implementation of this example is as follows.

The Decisions are configured with the following formulae:

  • Monday Only Task: @DAYOFWEEK(@TODAY())=1

  • Tuesday Only Task: @DAYOFWEEK(@TODAY())=2

As the @DAYOFWEEK function evaluates a date string and returns 0 for Sunday, 1 for Monday, and so forth, these equations only need to check for the numerical equivalent of the desired day of week.

Once validated (see Formula validation), the Decision interprets its formula in a more user-readable form, as shown below for the "Monday Only Task" example.

When run on a Monday, the "Monday" Decision and "Monday Only Task" are all that appears.

Related Links
TitleResults for “How to create a CRG?”Also Available in