Menu

Date calculation help !

doudou225
2013-05-05
2013-05-07
  • doudou225

    doudou225 - 2013-05-05

    Hello everyone , i m concerne with the ability To calculate date.
    Thé scénario si That i have variable date1 (reporting thé date the annual payement took place). I Want another variable date2 To calculate thé expiration date (date2=date1+365 day). I used executeformula handler, but cet stuck, doesnt work.

    Is it possible To do what i Want To do?
    Is executeformula handler thé way To do so?
    If yes, please tell me How?

    Thanks !

     
  • Natkinnat

    Natkinnat - 2013-05-07

    Operations on calendar are available in GPD 4.x version with the help of "Create date variable" action handler. You can set date and add various number of time unites to it. But if you use RunaWFE 3.x processes created in GPD 4.x wouldn't work for you.
    And alternative in GPD 3.x is to use BSHActionHandler and java code in it:

    java.util.Calendar calendar1 = java.util.Calendar.getInstance();
    calendar1.setTime(date1);
    calendar1.add(Calendar.YEAR, 1);
    date2 = calendar1.getTime();

    Variables date1 and date2 must be declared in the process definition variables list. Variable date1 must be initialized before this actionHandler executes.

     
  • doudou225

    doudou225 - 2013-05-07

    Thnks, i'll try this0 Currently using runawfe 3.5.2 same as gpd.
    Thanks again !

     

Log in to post a comment.