Hi everyone,
I have a table with employee names, time in, time out, and total hours.
In a query I want to create an expression (i.e., Total Hours After Meal Break) that will deduct a 30 minute meal break from any day where the total hours column is greater than or equal to 6.5, but less than or equal to13. I also need to deduct 1 hour for a meal break where the total hours column is greater than 13. However, if the total hours is less than 6.5 hours, then no need to the hours needs to be made.
So far I have this expression:
[FONT="]Total Hours After Meal Break: IIf([Total Hours]<=13 And [Total Hours]>=6.5,[Total Hours ]-0.5,[Total Hours]-1)[/FONT]
The expression works insofar as it is deducting either 30 minutes where the worker works more than 6.5 but less than 13 hours. However, for days where the worker is working less than 6.5 hours it is also deducting 1 hour. Again, on those days where the worker has less than 6.5 hours, no change needs to be made.
Any help is greatly appreciated.
I have a table with employee names, time in, time out, and total hours.
In a query I want to create an expression (i.e., Total Hours After Meal Break) that will deduct a 30 minute meal break from any day where the total hours column is greater than or equal to 6.5, but less than or equal to13. I also need to deduct 1 hour for a meal break where the total hours column is greater than 13. However, if the total hours is less than 6.5 hours, then no need to the hours needs to be made.
So far I have this expression:
[FONT="]Total Hours After Meal Break: IIf([Total Hours]<=13 And [Total Hours]>=6.5,[Total Hours ]-0.5,[Total Hours]-1)[/FONT]
The expression works insofar as it is deducting either 30 minutes where the worker works more than 6.5 but less than 13 hours. However, for days where the worker is working less than 6.5 hours it is also deducting 1 hour. Again, on those days where the worker has less than 6.5 hours, no change needs to be made.
Any help is greatly appreciated.