Calculate time difference between two Date objects

I have a session start time and end time, two objects of Date() type and would like to calculate the exact time duration of the session by calculating the difference between two Date objects. Any help please?

You can subtract dates from each other to get the difference.

1 Like

I found Moment.js to be very helpful, saved a ton of time. Thanks for your help though.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.