In javascript, I took the difference between twodates.
When Finding difference between two dates for example 12.00.PM to 02.00.PM, I got output 2
But when I am finding difference between two dates like 12.00.PM to 01.30.PM, I got output like 1.5. So I want to show this 1.5 like 1 hour 30 minutes in 12 hour clock. How to do that.

Member Avatar for diafol

There are better ways to do time differences. Have a look at moment.js

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.