Defining Logic > Functions > Calendar Functions > CalDay

CalDay

Note: the CalDay function is available only in the Professional edition of Process Simulator.

The CalDay() function corresponds to the weekday of the calendar date you defined as part of the warm-up period or simulation begin date under simulation properties. It returns an integer that corresponds to the day of the week, where 1 denotes Monday and 7 denotes Sunday. Since CalDay() resets with the advent of a new week, every weekday will return the same value (e.g., Wednesday will always return a value of 3). The function can be used in any logic. The function name must be followed by the pair of parentheses.

 

The following is an example of using the function:

If CalDay()=1 Then

{

     <logic statements>

}


© 2015 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com