doesn’t look right – %SUBST divides one string and in this case it should be one long string 9 places per item. previous discussion got the day number
Recommend that you change the day from Pearl Harbor day to 0001-01-01 since it will now compute earlier dates without a computational error.
DayOfWeek = %Subst((‘Sunday Monday Tuesday WednesdayThursday Friday Saturday ‘ ):(((%Rem(%Diff(%Date():%Date(0001-01-01′):*D):7)+1)*9))-8:9);
Please post your final code for the next guy/gal.
For anyone whose curious even with 0001-01-01 dates get screwed up when Britian and the British empire (except Scotland of course) adopted the current calander in 1751, to correct for the previous drift of Easter 1751 was a short year with only 282 days.