I have two dates startdate
and currentdate
.
How can I get the difference between the two dates in minutes
console.log("startdate: " + startdate + " currentdate: " + currentdate);
>> startdate: Tue Nov 10 2015 13:00:00 GMT-0800 (PST)
>> currentdate: Tue Nov 10 2015 11:55:53 GMT-0800 (PST)
console.log(startdate.getTime() - currentdate.getTime());
>> 3846736
I'm able to subtract the two dates, but I'm unsure of how to convert that output (output: 3846736
) into minutes.