Error: You cannot base a date calculation on an undefined date

Aravindh_NavisionAravindh_Navision Member Posts: 258
Hi Friends,

I got struck up in a place where got an error...
[b]You cannot base a date calculation on an undefined date.

Date: 0D
Formula: +1M[/b]

On activating the Debugger, I found that it shows an error in a code which is given below:

dtOldStart := dtStart;
CASE recServConHead."Invoice Period" OF
  recServConHead."Invoice Period"::Month:
  BEGIN                                                         (ERROR highlighting at this place)
    dtStart := (CALCDATE('<+1M>',dtStart)); 
    dtEnd := (CALCDATE('<+1M>',dtEnd));
  END;
  recServConHead."Invoice Period"::"Two Months":
  BEGIN
    dtStart := (CALCDATE('<+2M>',dtStart));
    dtEnd := (CALCDATE('<+2M>',dtEnd));
  END;
.
.
.
END;

Could anyone tell me what is the issue in it and how to rectify it?

Thanks in advance,
Aarvi R.

Comments

Sign In or Register to comment.