I have a Checklist that has some calculated columns to work out when the next Task Date will be. For my Monthly and Quarterly tasks, if the task falls in the next calendar year, it is giving "1280" or "5" as the result (see below).
The "Start Date" column is just a Date/Time column. Below is the formula for the Calc_TasxNextStartDate column.
=IF([Task Recurrance]="Monthly",IF(WEEKDAY(DATE(YEAR([Start Date]),MONTH([Start Date])+1,DAY([Start Date])),2)=1,DATETIME(YEAR([Start Date]),MONTH([Start Date])+1,DAY([Start Date]),HOUR([Start Date]),MINUTE([Start Date]),),IF(WEEKDAY(DATE(YEAR([Start Date]),MONTH([Start Date])+1,DAY([Start Date])),2)=2,DATETIME(YEAR([Start Date]),MONTH([Start Date])+1,DAY([Start Date]),HOUR([Start Date]),MINUTE([Start Date]),),IF(WEEKDAY(DATE(YEAR([Start Date]),MONTH([Start Date])+1,DAY([Start Date])),2)=3,DATETIME(YEAR([Start Date]),MONTH([Start Date])+1,DAY([Start Date]),HOUR([Start Date]),MINUTE([Start Date]),),IF(WEEKDAY(DATE(YEAR([Start Date]),MONTH([Start Date])+1,DAY([Start Date])),2)=4,DATETIME(YEAR([Start Date]),MONTH([Start Date])+1,DAY([Start Date]),HOUR([Start Date]),MINUTE([Start Date]),),IF(WEEKDAY(DATE(YEAR([Start Date]),MONTH([Start Date])+1,DAY([Start Date])),2)=5,DATETIME(YEAR([Start Date]),MONTH([Start Date])+1,DAY([Start Date]),HOUR([Start Date]),MINUTE([Start Date]),),IF(WEEKDAY(DATE(YEAR([Start Date]),MONTH([Start Date])+1,DAY([Start Date])),2)=6,DATETIME(YEAR([Start Date]),MONTH([Start Date])+1,DAY([Start Date]+2),HOUR([Start Date]),MINUTE([Start Date]),),IF(WEEKDAY(DATE(YEAR([Start Date]),MONTH([Start Date])+1,DAY([Start Date])),2)=7,DATETIME(YEAR([Start Date]),MONTH([Start Date])+1,DAY([Start Date]+1),HOUR([Start Date]),MINUTE([Start Date]),),0))))))))
I'm assuming I'm missing something small but can't pick up what it is - any suggestions?