Loading
Communityhelp with java script in a calculation fielld.

help with java script in a calculation fielld.

  • Peter Ford (Customer)

    Hi All,

    After a little fooling around with the Calculations field - i have come up with this. Seems to work well.

     

    var DOB = matter.clientList[0].matterCardPersonList[0].dateOfBirth

    var DateOfInjury = matter.criticalDates.dateOfInjury.date

    var Difference_In_Time = DateOfInjury.getTime() - DOB.getTime()

    var Difference_In_Days = Difference_In_Time / (1000*3600*24*365.25);

    return Math.floor(Difference_In_Days);

    Expand Post

Loading
help with java script in a calculation fielld.