I want to calculate the ot hours from difference of the out time and in time.i would like to know the possible way to achieve it using angular js.importanly i need it in hour:minutes:seconds format.following is sample of my code.
my view
<table class="row-border hover table table-bordered cb-data-table">
<tr>
<th>In Time</th>
<th>Out Time</th>
<th>OT Hours</th>
</tr>
<tr ng-show="!dailyAttendances.length">
<td colspan="3" style="text-align: center">~ No Any Records ~</td>
</tr>
<tr ng-repeat="dailyAttendance in dailyAttendances" >
<td>@{{ dailyAttendance.in_time}}</td>
<td>@{{ dailyAttendance.out_time}}</td>
<td></td>
</tr>
</table>
My javascript file
$scope.loadAllDailyAttendance = function () {
$scope.dailyAttendances = {};
$http({
method: "GET",
url: "/attendance/loadAllDailyAttendance",
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
}).then(function successCallback(response) {
$scope.dailyAttendances = response.data;
console.log(response.data);
}, function errorCallback(response) {
});
};