Date Math

Kenneth Brody kenbrody at bestweb.net
Tue May 16 06:10:37 PDT 2006


(Top-posting corrected)
Quoting beppler (Tue, 16 May 2006 13:05:50 +0000):

[...]
> > I haven't tried this, but what about:
> >
> > Subtract the two dates, multiply by 24, and add to the difference
> > of the two times.
[...]
> Works if end time is greater then or equal to start time.
>
> Does not work if end time is Less then the start time
[...]
> date1: 05/13/2006   time1 12:00:00
> date2: 05/15/2006   time2 11:00:00
> elapsed time   71.000       Wrong!!
[...]
>        Then: tm(8,time)=4-3
>        Then: 5=(2-1)*"24"+tm;display

The "time" edit wraps at 24 hours.  You want "hms" instead.

Also, why the temporary tm field?

    5 = (2-1)*"24"+(4-3)


--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list