I have the total number of hours worked which is “40:00:00” and I have the number of hours worked for each employee.
How do I subtract the employee’s hours worked from the total hours worked?
Then I check whether the number of hours worked by the employee is equal to the number of hours worked or less
totalHours = TimeSpan.Parse("40:00:00")
For Each hour in employeeHoursList:
hourDiff = totalHours - TimeSpan.Parse(hour)
if (TimeSpan.Parse(hour) <= totalHours):
Then "Continue next process"
@NA_AN
(subtraction , NumOfHoursWorked ,totalNumOfworked) type : timeSpan
edit the condition to
subtraction<TimeSpan.Parse(“00:00:00”)
or to
NumOfHoursWorked < totalNumOfworked