Can anyone help with the following Date Calc? I get a date time unit error message on the Calcdate line thanks in advance.
startd and endd are variable date field from user Option Request form
FOR Y:=1 TO 12 DO BEGIN
IF startd<>0D THEN BEGIN
sd[Y] := STRSUBSTNO('-%1M+startd',Y);
ed[Y] := STRSUBSTNO('-%1M+endd',Y);
END;
sd2[Y]:= CALCDATE(sd[Y]);
ed2[Y]:= CALCDATE(ed[Y]);
END;
0
Comments
Thanks anyway for your help!!
Do not forget to add '<' and '>' around the string before passing it to the CALCDATE, else you will have problems when you switch client into another language.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.