Date & Time help, please!

A

AnnieP

On a form, I have the following fields:
[Date In], [Time In], [Date Out],[Time Out], [Shift]and
[Total Time In] .

1. Using [Time In],I need to calculate the "Shift" the
occurence began (which I have been able to do).
2. I also need to calculate the total amount of time
spent "In". My problem is when [Date Out]is different than
[Date In], the result is incorrect.

If I put [Date and Time In] and [Date and Time Out] in a
field formated for general date,I can get the correct
amount of time in (days, hrs, mins) but I cannot find a
way to produce the [Shift].

If possible, I prefer to keep the date and time fields
separate. If not, I can live with it. Can someone please
help me?

Many, many thanks in advance,
 
A

Allen Browne

It would probably be easier to combine them, but you could type this into
the Field row of a query to get the number of minutes between the date and
time pairs:

Minutes: DateDiff("n", [Date In] + [Time In], [Date Out] + [Time Out])
 

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

Top