durations

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Time Calculations 1
Time Calculated minus breaks & lunch 2
subtracting time duration 3
Calculation 1
HELP !!!! Calculate TIME 0
Add up time 1
Calculating Time 2
Time Calculations..subtracting Minutes 3

Back
Top