Date & Time help, please!

  • Thread starter Thread starter AnnieP
  • Start date Start date
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,
 
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])
 
Back
Top