Subtracting Dates

I have 2 variables, one is start time and the other is stoptime. I want to subtract starttime from stoptime to get total time in hours, minutes or seconds. What I’m currently doing is first converting them to number and then subtracting (var1.value.toNumber-var2.value.toNumber) but it’s not working. Kindly suggest some solution.

Community Page
Last updated: