jeudi 16 novembre 2017

Overtime Calculate

I want to calculate overtime hours. With break time is 12.00-13.00. Overtime_start = 11.30 . But the result is 0.7, the result that I want is 0.5 because 11.30-12.00 is 30 minutes

DB::Table('overtime')
        ->whereBetween('overtime_start',['07:00:00','12:00:00'])
        ->where('overtime_end','>','12:00:00')
        ->update(['total_session_1'=> DB::raw('(120000 - overtime_start)/10000')]);



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2htQMv3
via IFTTT

Aucun commentaire:

Enregistrer un commentaire