** This thread discusses the article: Day of Week Revisited **
Use the DAYOFWEEK scalar function when the week should begin on Sunday as day 1 (thru Saturday as day 7). c/EXEC SQL Set Option DatFmt = *ISO c/END-EXEC c/EXEC SQL Set :MyDayNumber = DAYOFWEEK( ateISO ) c/END-EXEC Use DAYOFWEEK_ISO scalar function when the week should begin on Monday as day 1 (thru Sunday as day 7). c/EXEC SQL Set Option DatFmt = *ISO c/END-EXEC c/EXEC SQL Set :MyDayNumber = DAYOFWEEK_ISO( ateISO ) c/END-EXEC
** This thread discusses the article: Day of Week Revisited **
There is a typing error in the procedure implementation of getDayOfWeek. It says DayOfWeek in the B and PI line, it should be getDayOfWeek.
** This thread discusses the article: Day of Week Revisited **
Hi Bob, The date format Lilian is a count of the number of days since the Gregorian calendar was introduced which is why the start date is 14th October 1532. You can use the CEEDAYS api to convert your date into Lillian and then use getdayofweek, or any other kind of mathematics for that matter. Matt
Comment