AnsweredAssumed Answered

calculate the days between two dates

Question asked by tomi87 on Feb 3, 2013
Latest reply on Feb 4, 2013 by tomi87
I want to calculate the days between two dates.
But I don't know how to do this.
Right now I tried it with:
<activiti:formProperty id="dateFrom" name="Date from (dd-MM-yyyy)" datePattern="dd-MM-yyyy hh:mm" type="date"            required="true" />
<activiti:formProperty id="dateToo" name="Date too (dd-MM-yyyy)" datePattern="dd-MM-yyyy hh:mm" type="date"         required="true" />
(he say datePattern  is not allowed…) (I'm using the newest version)

public void execute(DelegateExecution execution) {
StAppInfo sai = new StAppInfo ();
sai.setDateFrom((DateFormType) execution.getVariable("dateFrom"));
sai.setDateToo((DateFormType) execution.getVariable("dateToo"));

public class StAppInfo implements Serializable {
        private DateFormType dateFrom;
   private DateFormType dateToo;
But there I can't find a possibility to calculate the days between this two dates, or to convert this into days or minutes.

Do you have some suggestions for me ?