I have a formula that is taking an array which outputs number like this 05/28/14 and need to have it formatted as a date. I am using this code and it is telling me "A Subscript must be between 1 and the size of the array.". I think the problem is with my Month field but am unsure.
stringvar array dates;
numbervar d;
numbervar m;
numbervar y;
dates := split({custinvd.cid-sparedate},",");
d := val(right(dates[1],2));
m := tonumber(dates[2]);
y := val(left(dates[3],4));
cdate(d,m,y);