Subtracting Time

jgandino

Registered User.
Local time
Tomorrow, 06:40
Joined
Oct 4, 2004
Messages
11
I have quite a few questions regarding the basics of subtracting time, so this probably will be an ongoing thread (if it needs to be in a different forum area, please advise).

Interface:

User is presented with a form so that they may log onto a position. They put in their initials, along with the time they sign on, as well as the time they sign off.

Problem:

We track our logs from 12 am - 11:59 pm local. If you have ever worked with zulu time, this can equal something like 22:00. So if the user logs on at 22:00 and logs off at 04:00 (even though it is the same day local time), and I try to subtract it, i get the invert, like 18:00 hours on position, not the true 6:00 hours on position.

I will provide an attachment as soon as I remove some sensative information. Thank you for your assitance.
 
Seems to me that you will need to add the date piece in your calculations somewhere...

???
kh
 
How would I work that with zulu time or into converting local with zulu? That wouldn't interfere with the dates would it? Thank you.
 
How about:

if end time > start time then
calcTime = end time - start time
else
calcTime calcTime = start time - end time -12
end if

???
kh
 
Subtract Time

Sounds like you may have something. I'll try that. Thanks.
 

Users who are viewing this thread

Back
Top Bottom