Skip to content

Commit

Permalink
working hour
Browse files Browse the repository at this point in the history
  • Loading branch information
Sadam100 committed May 17, 2022
1 parent 92f7937 commit 383de0c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions backend/controllers/attendance_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,18 @@ module.exports.report = async (req, res) => {
}
]
}
}, {
'$addFields': {
'HOUR': {
'$divide': [
{
'$subtract': [
'$TakenOut', '$TakenIn'
]
}, 3600000
]
}
}
}, {
'$group': {
'_id': '$UserID',
Expand Down

0 comments on commit 383de0c

Please sign in to comment.