I have to calculate the difference between 2 timestamps. Also can you please help me with conversion of a string into timestamp. Using plain javascript only. NO JQUERY.
Based on the approved answer:
function(timestamp1, timestamp2) { var difference = timestamp1 - timestamp2; var daysDifference = Math.floor(difference/1000/60/60/24); return daysDifference; }