Workin with time data

  • Thread starter Thread starter lrumd
  • Start date Start date
L

lrumd

Guest
I am trying to do some simple math with time data (this is for a simple payroll app) On a certain table I have a field "MondayIn" and another one "MondayOut". I want to calculate the time difference (MondayOut - MondayIn) and put the result in a 3rd field ("MondayTimeWorked"). How do I do this?
The employee will have to enter the MonayIn and MondayOut data through a Form, and I would like to display the "MondayTimeWorked" information on this Form using a Text Box.
Thanks
Luis
 
Look up DateDiff in the Help Files. If the dates are on the same day (and from the way you asked your question, they should be), then the difference can be obtained in either hours or minutes pretty easily. This is even something that could be put into a simple query without resorting to VBA code.
 

Users who are viewing this thread

Back
Top Bottom