Re: Time Calculation

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Mark,

Why don't you use the European format; I mean you could program:

if AMPM = 1 then    -- if it's afternoon, add 12 to hours
    hours += 12
end if

Only problem I see, is for working night shifts; a day number should be
added then.

Hope this helps,

Ad

----- Oorspronkelijk bericht -----
Van: Liquid-Nitrogen Software <nitrogen_069 at HOTMAIL.COM>
Aan: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Verzonden: zaterdag 27 november 1999 11:23
Onderwerp: Time Calculation


> Hi, I'm working on an application for my wife's work, and I need to
> calculate how long a worker has worked, given a start time, and an end
time.
> Each start/end time is in a sequence like this:
>
> {Hour(1-12), minute(0-59), second(0-59), AM/PM (0/1)}
>
> I need to be able to calculate the number of seconds from the start time
to
> the end time, but the AM/PM thing is realy confusing to program with.
>
> any help would be REALY appreciated!
>
> Thanks,
>     Mark / Liquid-Nitrogen.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu