I made the change in my above code, inserting your suggestion:
for /f "usebackq tokens=2 delims=/ " %%n in ('%date%') do set /a m=1%%n - 100
This worked while in August and September, but this morning - October the 4th, I got an error code again. Why would that be?
(Using the windows calendar I changed the month back to September and everything worked. Changed it to October the 5th and everything worked).