Function to return day of week? (AREV Specific)
At 25 NOV 1998 02:06:34PM Jim Dierking wrote:
I would like to creat a symbolic field that shows the day of the
week for a given date in another field. I didn't see any dictionary
formats that allow this. Any suggestions would be appreciated.
TIA, Jim Dierking
At 25 NOV 1998 02:26PM Victor Engel wrote:
There are two ways to do this on another thread. Both are based on the fact that mod(date,7) has a 1 to 1 correspondence with the day of the week.
At 25 NOV 1998 07:55PM Jay Fox wrote:
FUNCTION GET.DAY.OF.WEEK(DATE)
*DATE IS ANY DATE IN INTERNAL REV FORMAT
DAY=MODE(DATE,7)+1
BEGIN CASE
CASE DAY=1;DAY=SUNDAY"
CASE DAY=2;DAY=MONDAY"
ETC, ETC, ETC
CASE DAY=7;DAY=SATURDAY"
END CASE
RETURN DAY