How to get difference between two time patterns using javascript

Posted by Amritha444 under JavaScript on 5/5/2011 | Points: 10 | Views : 2531 | Status : [Member] | Replies : 1
hi all

i wnt to get difference between two time patterns using javascript

Time is in decimal type

I want difference between two time in time using javascript

Please suggest solution for it

Thanks in Advance

Regards

Amritha




Responses

Posted by: Ndebata on: 5/5/2011 [Member] Starter | Points: 25

Up
0
Down
Hi

You can use getTime() function on date then subtract one from other.
var d1,d2 are two dates
d1.getTime()-d2.getTime()
The result number will be in millisecond,You can use it as per your need.

Thanks,
Debata

Amritha444, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response