durations

M

mchicke

I would like to subtract 1/2 hour from a calculated duration of time. The
exapmle in question relates to a lunch break for employees, taken out of
their total time calculated by subtracting their time out from time in. Any
thoughts?
 
L

Larry Linson

mchicke said:
I would like to subtract 1/2 hour from a calculated duration of time. The
exapmle in question relates to a lunch break for employees, taken out of
their total time calculated by subtracting their time out from time in. Any
thoughts?

Under what circumstances, or where, do you wish to do that. Assuming you
have the duration in a floating point single or double, as a number of hours
(with fractional hours), in VBA, it would be:

dblTimeWorked = dblTimeCalc - .50

The calculation could be performed in VBA code before you store the value,
or later, in a query when you retrieve it, or as the Control Source of a
TextBox on a Form or Report.

Larry Linson
 
M

mchicke

The output format of the duration is in hh:mm format. I used a function
found on this website (HoursAndMinutes) to help me calculate the duration.
 
Top