خرید بک لینک

Vote count: 0

I have 2 date time picker. assume that in my database already saved the data needed

//Status      //Date      //Time      //name
----------------------------------------------
Check In     1/8/2016    12:30:36pm     ali
  Lunch      1/8/2016     2:40:36pm     ali
Check In     1/8/2016     3:40:36pm     ali
Check Out    1/8/2016     6:40:36pm     ali

As i don't want to calculate the lunch time. as i want to calculate what my employee work for that day

6:40:36 PM - 12:30:36pm = 6 //total hours worked include lunch

So i have to subtract the Lunch - Checkk in which take 1 hours

6 - (3:40:36 PM - 2:40:36 PM) = 5 hours //total hours that worked

What kind of logic should i have to do this? I already know all type of SQL clause to pick from my database. But i need a way that can calculate this easier without implementing huge lines of codes.

asked 44 secs ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 11 مرداد 1395 ساعت: 18:57

صفحه بندی