Hi I know you may think that many of them may have asked this question, but the scenario is quite different.
Since I am calculating the total shift hours done by labor monthly wise the hours will be more than 24hrs. I have achieved this by DateInterval.
Now I have 2 times and want to get the difference of those in php.
$workedHours = '78:25:10';
$miscSpentHours = '02:26:11';
$totalWorkedHours = $workedHours - $miscSpentHours; // Must Result - 75:59:59
I have used sub, diff, strtotime with it but not getting properly. I am converting it to appropriate date types while conversion.
Any help really appreciated. Thanks.