WEEKDAY ( date )
|
WEEKDAY ( datetime-expression )
|
DEFINE VARIABLE birth-date AS DATE NO-UNDO
LABEL "Birth Date". DEFINE VARIABLE daynum AS INTEGER NO-UNDO. DEFINE VARIABLE daylist AS CHARACTER NO-UNDO FORMAT "x(9)" INITIAL "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday". DEFINE VARIABLE dayname AS CHARACTER NO-UNDO LABEL "Day You Were Born". DEFINE VARIABLE daysold AS INTEGER NO-UNDO LABEL "Days Since You Were Born". REPEAT: SET birth-date. ASSIGN daynum = WEEKDAY(birth-date) dayname = ENTRY(daynum, daylist) daysold = TODAY - birth-date. DISPLAY dayname daysold. END. |