Click to See Complete Forum and Search --> : Date class [resolved]
filburt1
Dec 24th, 2001, 11:00 AM
How can I get the number of seconds between two Dates? For example, if Date "now" was "Tue Jan 01 00:00:00 EST 2002" and Date "then" was "Tue Jan 01 00:00:30 EST 2002", the difference would be 30.
crptcblade
Dec 24th, 2001, 01:35 PM
set the two Dates up, and use the getTime() method to get the date in milliseconds. Then find the difference between the two and multiply by 1000.
:)
filburt1
Dec 24th, 2001, 03:34 PM
Divide by 1000. :p
Trying it now...
crptcblade
Dec 24th, 2001, 03:37 PM
Originally posted by filburt1
Divide by 1000. :p
Trying it now...
Whatever :rolleyes:
If I gave you the right answer all the time, you'd never figure things out for yourself.
:D
filburt1
Dec 24th, 2001, 03:37 PM
Awesomely outrageous, it works. :)
And shut up. :D :D
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.