day = getDayOfWeek( [ date ] );
The getDayOfWeek subprocedure returns the day of the week as 1 to 7 (1=Sunday, 2=Monday, etc.) for the given date.
If no date is specified for the first parameter, the current system date is used and its day is returned.
/free
today = getDayOfWeek(); // Return today's day of week
yesterday = getDayOfWeek(%date() - %days(1)); // What was yesterday?
shipOn = getDayOfWeek(shipDate); // On which day did the order Ship?
/end-free
Valid date fields or the %DATE built-in function may be specified for the date parameter. If no date parameter is specified, then the current system date is used.
Return to RPGOpen.com