Create an Expression to Calculate the End Date

  I was doing “ Become a Rapid Developer Course”.  Currently I am at 7.4.1 -Create an Expression to Calculate the End Date.   I was setting a function to calculate the end date as following the steps-   “So the function will be addDays(Date and time, Integer/Long or, if you relate that to your Domain Model and the calculation you are creating, addDays([start date], [duration]).”     I finally written this but not sure what should be  set for duration?  Duration should be Integer or Long.   addDays($TrainingEvent/StartDate, 2)
2 answers

Hey Vashuna,

The course duration should be in days only (integer) 

because days can in 3days or 543 days but it cannot be 3.2 days.


So you should set the course duration to integer.

This way, you can easily set the end date from course duration and start date.


Hope it helps!


in your case you should use Integer. 

The only difference between Integer and Long is that Long can be a larger number than Integer.

The maximum value of Integer is -/+2147483647

Most of the time integer is more than enough.