You can use the following expression to take two date values and return the amount of time elapsed between the two: var date1 = new Date($date_field1); var date2 = new Date($date_field2); var timeDiff = Math.abs(date2.getTime() – date1.getTime()); var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24)); SETRESULT(diffDays); // to show the difference in days