Skip to main content

[Migrated content. Thread originally posted on 05 April 2005]

Does anyone know of a easy way to retrieve the "day" of the week, (Monday, Tuesday, etc) by passing a date. I cannot find a version of the accept verb that does this.

[Migrated content. Thread originally posted on 05 April 2005]

Does anyone know of a easy way to retrieve the "day" of the week, (Monday, Tuesday, etc) by passing a date. I cannot find a version of the accept verb that does this.
short example :)

77 tmp-ansi pic 9(6) value zeroes. | Date in ANSI-Format
77 date pic 9(8).

01 wtg pic 9 value zeroes. | weekday
88 wt-sun value 0.
88 wt-mon value 1.
88 wt-tue value 2.
88 wt-wed value 3.
88 wt-thu value 4.
88 wt-fr value 5.
88 wt-sa value 6.
88 wt-su value 7.

compute tmp-ansi = function integer-of-date ( date ).
compute wtg = function rem ( tmp-ansi, 7 ).


regards
David