savagenoob Posted February 22, 2010 Share Posted February 22, 2010 I am trying to create a time clock system and have run into a problem. Because people will miss either a clock in/clock out and will need to be entered manually at a later time, I cannot think of a way to calculate total time worked. The way I was doing it was to calculate the minutes from any clock 'out' since the last clock 'in' when the button was pushed and my mysql table entered the minutes in the database, then I just had to add that row together to get the total time, but I cant do that when someone enters in a manual timestamp so I need to find another method, maybe someone has an idea. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
86Stang Posted February 22, 2010 Share Posted February 22, 2010 Why can't you do it when someone enters a time manually? Is it the formatting of the time they may enter that's throwing you? Quote Link to comment Share on other sites More sharing options...
savagenoob Posted February 22, 2010 Author Share Posted February 22, 2010 No, I can format that, but since it auto calculates at the clock 'outs', when its entered manually it would have to somehow find the last clock in or out and calculate the difference, just dont know a function that would search for the last timestamp before the one manually entered, or just calculate the minutes all at one time, but I havent figured out how to do that either. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.