Page 1 of 1
Number of seconds between two times

Posted:
Jul 17, 2002 @ 4:05pm
by Pam

Posted:
Jul 17, 2002 @ 4:21pm
by Michael Y

Posted:
Jul 17, 2002 @ 5:02pm
by britcode
UNIX has a system when all times are espressed in seconds since some special date in 1970, and I think you can get this is Windows as well.
Possibly by calling time() or another ANSI function?
Obviously in this case this system is easier to work with than a function which returns hours and seconds and stuff.
...though it does run out in 2037 or something (when all UNIX machines will die!)
update - just checked eVC, and there's no time function I must be thinking of Gnu GCC.
Oh well - I guess they stripped out all the UNIX stuff in Windows CE - makes sense.

Posted:
Jul 17, 2002 @ 5:02pm
by Pam
Michael, the problem is how you get to time1 and time2 if they are spread apart by years. If it's time within one day, it's pretty easy to add the hours minutes seconds together. But over years or decades it's much more difficult to figure out.
Pam

Posted:
Jul 17, 2002 @ 6:08pm
by Digby
It comes down to computing which year is a leap year (contains 366 days vs. 365). You already know how many days are in each month, and how many seconds are in a day. Do the math sistah!

Posted:
Jul 17, 2002 @ 6:17pm
by Pam

Posted:
Jul 17, 2002 @ 10:07pm
by refractor

Posted:
Jul 18, 2002 @ 1:10am
by BadBazza

Posted:
Jul 18, 2002 @ 3:27am
by Dan East

Posted:
Jul 18, 2002 @ 3:40am
by Dan East

Posted:
Jul 18, 2002 @ 12:26pm
by BadBazza