Guest.Visitor
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( :DateISO ) 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( :DateISO ) c/END-EXEC
cramer@multi-support.dk
There is a typing error in the procedure implementation of getDayOfWeek. It says DayOfWeek in the B and PI line, it should be getDayOfWeek.
Guest.Visitor

[size="1">Code[/size>
Guest.Visitor
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
Please login to make comments.
User Rating: / 2
PoorBest 

   MC-STORE.COM