May-27-2020, 07:08 PM
I'm trying to subtract a date such as 05/01/2020 from a integer such as -1. Any suggestions?
File "C:\Python37-32\pr_import.py", line 251, in proceed
dteStartDate = m0weekbeg - cnt
TypeError: unsupported operand type(s) for -: 'str' and 'int'
int(cnt) dteStartDate =datetime.strptime(dteStartDate,'%m/%d/%Y').date() if dteStartDate.weekday() != 1 : cnt = cnt+1 dteStartDate = m0weekbeg - cntError is below:
File "C:\Python37-32\pr_import.py", line 251, in proceed
dteStartDate = m0weekbeg - cnt
TypeError: unsupported operand type(s) for -: 'str' and 'int'