I am trying to build Job management tool. I have database with employers who have their card id for Open In and Out.
I want to calculate how many hours they spend outside, and how many they have effective.
My Data:
Log Time: 2015-07-02 08:57:00
Type: Normal Open
Log Time: 2015-07-02 09:21:00
Type: Normal Open
Log Time: 2015-07-02 10:37:00
Type: Normal Open
Log Time: 2015-07-02 10:53:00
Type: Normal Open
Log Time: 2015-07-02 14:29:00
Type: Open (Forward)
Log Time: 2015-07-02 15:20:14
Type: Open (Out)
Log Time: 2015-07-02 15:20:22
Type: Open (Out)
Log Time: 2015-07-02 15:25:22
Type: Open (Forward)
Log Time: 2015-07-02 15:48:22
Type: Ilegal
Log Time: 2015-07-02 16:02:39
Type: Open (Forward)
We have here total: You worked this day: 7 hours, and 5 minutes ( already build with PHP )
Now, there are two OUT's in this case. I want to calculate how much time they spend outside. Is this possible and how i can do it?
Working on PHP5. Remember, this employers can have more outs/ins. So i want to fetch on total time spend outside.
Thanks!
Aucun commentaire:
Enregistrer un commentaire