How to get total number of hours between two dates in javascript? <p>I am in a situation where I need to find out the total hour difference between two date objects but the thing is dates aren't present in the actual format.</p> <p><code>Date 1: 6 Apr, 2015 14:45</code><br> <code>Date 2: 7 May, 2015 02:45</code></p> <p>If it would have been in standard format, simply I would have been used below method: <code>var hours = Math.abs(date1 - date2) / 36e5;</code></p> <p>I am not sure how do I get the hour difference here... please help.</p>