MS Access

  • Thread starter Thread starter Eclay
  • Start date Start date
E

Eclay

I am using MS Access to input data regarding "Time in" and "Time out"
sessions. People sign in and place the times they came in and then sign
out when they're done. However I'd like to create an output field on a
report using MS Access that will determine the total amount of minutes
that the indivdual spent by comparing the two fields. I'm currently
using military time data types to enter in the data and I could like to
somehow parse the two values into into a format that would then allow me
to perform calculations with them. Namely to subtract the "Time in"
field from the "Time out" field to give me a total minutes column. I
would like to enter in a formula that would do this automatically within
the report so all I have to do is enter in the times. Can anyone help
me? Thanks
 
There isn't a "military time data type" in Access. There is a date-time data
type which may be formatted in the manner you describe, but formatting only
affects the display of the data, not the way it is stored. The way it is
stored is somewhat unintuitive and "military time notation" is stored in the
variable or field exactly the same as "AM/PM notation".

To subtract one Date/Time variable or field from another Date/Time variable
or field, see the DateDiff function in Help -- it allows you to choose the
units for the numeric answer and minutes is one of the choices.

Larry Linson
Microsoft Access MVP
 
Back
Top