Results 1 to 5 of 5

Thread: Date class [resolved]

  1. #1

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935

    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.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    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

  3. #3

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    Divide by 1000.

    Trying it now...

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Originally posted by filburt1
    Divide by 1000.

    Trying it now...
    Whatever

    If I gave you the right answer all the time, you'd never figure things out for yourself.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    Awesomely outrageous, it works.

    And shut up.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width