Hi I am creating Attendance management system.
User can enter working time from and to for based on project and I want to calculate normal working time automatically.
For example
1. Project A 09:00 - 12:00: 180minutes for normal time
2. Project B 13:00 - 19:00 300minutes for normal time, 60minutes for overtime1
3. Project C 22:00 - 25:00 120minutes for overtime1, 60minutes for overtime2
# 09:00 - 18:00 Normal time, 18:00 - 24:00 overtime1, 24:00-27:00 overtime2
Screen Image is like this

When I push save button, each ThisItem is saved in collection.
So when I save in collection, I want to calculate from input and want to save in collection automatically.
How can I calculate??
Or it is OK to have non-editable text box for overtime1 and overtime2 in gallery and calculate there.
Here is the source code of save button. I have no idea to calculate overtime1 and overtime2.
Patch(
DetailCol,
ThisItem,
{
WorkingDay: WorkingDay.SelectedDate,
Employee:ThisItem.Employee,
ProjectName:ThisItem.ProjectName,
WorkingHourFrom: Value(WorkingHourFrom.SelectedText.Value),
WorkingMinuteFrom: Value(WorkingMinuteFrom.SelectedText.Value),
WorkingHourTo: Value(WorkingHourTo.SelectedText.Value),
WorkingMinuteTo: Value(WorkingMinuteTo.SelectedText.Value),
Note: Note.Text,
saveBtn: false
}
);