Subtraction and summation of time (hour and minute)

  • Thread starter Thread starter Duck
  • Start date Start date
D

Duck

Can anybody help?
In the table, the activities duration has been stored in
HOUR/MINUTE format e.g. 00010226 =102 hour and 26 minute;
00001545 =15 hour and 45 minute, etc...
In generating query and form, how can I show in actual
time format (i) in hour and minute and (ii) do the
subtraction and summation for the time.
I.e. subtraction = 86 hour and 41 minute
And summation = 118 hour and 11 minute
Thank you....
 
There is a Date/Time format, but that is for a point in time, and seems not
to be what you are using anyway. In what kind of field are you storing these
"special format" numbers? I would store them in Long Integers in the
smallest unit you are using, e.g., minutes, so for 102 hours and 26 minutes,
I would store 6146 minutes. That will simplify the calculation, and you can
calculate and format to show the result as you want.

lngHours = lngTime \ 60
lngMins = lngTime mod 60

Larry Linson
Microsoft Access MVP
 
Back
Top