Time issue

  • Thread starter Thread starter bob
  • Start date Start date
B

bob

I am creating a calculating work sheet in access and want the have and in and
out time which will subtract them and show the difference. I have that down
but the part i cant get is to have it subtract the first 45 mins or what ever
static value that i need to have to have for different situations.
 
If your table has fields like this:
PunchIn date/time when the person started for the day
PunchOut date/time when the person finished for the day
LunchMinutes Number how many minutes to subtract for lunch
then you could type an expression like this into the Field column in query
design:
DateDiff("n", [PunchIn], [PunchOut]) - [LunchMinutes]

If you want that in hours and fractions, and need to cope with blanks in the
LunchMinutes column, it might become:
(DateDiff("n", [PunchIn], [PunchOut]) - Nz([LunchMinutes],0)) / 60
 

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

Back
Top