Running a report and getting this error, can anyone tell where I'm going wrong with this formula?
stringVar array Years := ['2004','2005'];
stringVar array Months := ['01','02','03','04','05','06','07','08','09','10','11','12'];
if {OEHDRHST_SQL.inv_dt} = 0
then 'Zero Date'
else Years[Year(MACOLANumberToDate({OEHDRHST_SQL.inv_dt}))-2004]+'-'+Months[Month(MACOLANumberToDate({OEHDRHST_SQL.inv_dt}))]
stringVar array Years := ['2004','2005'];
stringVar array Months := ['01','02','03','04','05','06','07','08','09','10','11','12'];
if {OEHDRHST_SQL.inv_dt} = 0
then 'Zero Date'
else Years[Year(MACOLANumberToDate({OEHDRHST_SQL.inv_dt}))-2004]+'-'+Months[Month(MACOLANumberToDate({OEHDRHST_SQL.inv_dt}))]