Skip to content
Advertisement

PHP getting TIME difference in hours and minutes format

I’m currently new to PHP , and I am stuck on this problem. I cant seem to subtract the TIME IN from employee SCHEDULE

JavaScript

PS: I also tried date_diff method, but it doesn’t work on me. THis is what my database looks like

enter image description here

Advertisement

Answer

I got the answer, i did it like this. Example: shiftstart 08:30:00AM and timein= 8:34:00 AM

JavaScript

}

OUTPUT SHOULD BE LIKE THIS: 00:04:00

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement