Working with Time Data

SherriKilgore

Registered User.
Local time
Today, 05:09
Joined
May 4, 2012
Messages
19
I have an issue where the time is stored as a number (example 742 = 7:42AM, 1942 = 7;42PM). I need to convert this to time, from military to 12 hour so I can calculate the hours worked for an employee between their time clock punches. Thanks for any ideas you can give.
 
CDate() is remarkably flexible as long as you give it something like a valid datetime stamp. Do you have the 'date' portion of the clock punch in another field?

For instance:
Code:
CDate([DateField] & " " & Left([TimeField],Len([TimeField])-2)& ":" & Right([TimeField],2))
Put that in a calculated field in your query. I believe in Access you'll have to do that in one query, and then compare the login/logout in a second-level query, but I may be mistaken.
 

Users who are viewing this thread

Back
Top Bottom