DAY OF WEEK( DATE )
Placeholder | Tooltip | Replace With |
DATE | d: Date | A Date variable |
Returns a Number value
This expression determines on which day of the week a specific date falls and converts that value to an integer.
These integers are as follows:
Sunday = 1
Monday = 2
Tuesday = 3
Wednesday = 4
Thursday = 5
Friday = 6
Saturday = 7
For example, perhaps you want to determine whether a payment due date falls on a Saturday or Sunday. If it does, HotDocs moves the payment due date to the following Monday. The following script shows how this works:
IF DAY OF WEEK( Payment Date ) = 7
Payment Date + 2 DAYS
ELSE IF DAY OF WEEK( Payment Date ) = 1
Payment Date + 1 DAYS
ELSE
Payment Date
END IF