Jump to content

Time Difference Help


savagenoob

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/192994-time-difference-help/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.