Hi Everybody, I have defined fields like Employement Date,Probation Duration & Date of Confirmation.Now, i need to get the output as Date of Confirmation = Employement Date + Probation Duration where the data for Probation Duration will be entered in terms of months.Can i have a code for this? Thanks & Best regards Hari
Hari, Have a look at the CALCDATE statement. DateOfConfirmation := CALCDATE(ProbationDuration,EmployementDate);
Hi Willy, Thank for this.But it throws error “The contents ‘0’ of CALCDATE parameter no.1 are invalid”. Best Regrards, Hari
Hi Hari, It’s best to define the field ‘ProbationDuration’ as a Dateformula. That way you can enter ‘1M’ for one month, ‘2M’ for two months and so on.
Hi Willy, Still…the error says “You cannot base a date calculation on a undefined date”.
Change the code to handle errors: if “Employment Date” > 0D then “Date Of Confirmation” := CALCDATE(“Probation Duration”,“Employement Date”);
Thanks to both Willy & steen.Now its working fine. Best Regards Hari