|
-
Dec 24th, 2001, 12:00 PM
#1
Thread Starter
Member
Date class [resolved]
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.
Last edited by filburt1; Dec 24th, 2001 at 04:38 PM.
-
Dec 24th, 2001, 02:35 PM
#2
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.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Dec 24th, 2001, 04:34 PM
#3
Thread Starter
Member
Divide by 1000. 
Trying it now...
-
Dec 24th, 2001, 04:37 PM
#4
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Dec 24th, 2001, 04:37 PM
#5
Thread Starter
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|