# Time variable

This topic is 5660 days old. Please don't post here. Open a new topic instead.

## Recommended Posts

This is what I have for a total break time.

I need to have 15 minutes (or .25 of an hour) to be the starting time. So, the employee is allowed 15 minutes but gets docked after this amount. I am looking for the total over 15 minutes.

Round(Hour( End Break 1 - Start Break 1 ) + Minute( End Break 1 - Start Break 1 ) / 60 - Lunch fake,2)+If(End Break 1 <= Start Break 1,24,0)

Thank you, Don

##### Share on other sites

Time is stored in seconds. 900 is the number of seconds in a 15 minute increment. So, all you have to do is subtract the two break time fields and subtract 900 seconds to be left with the number of hours, minutes and/or seconds beyond their allotted break time.

(End Break 1 - Start Break 1) - 900

Make sure the result of this calculation is time.

I'm not sure I understand the "Lunch fake" field but hopefully I have provided enough information to complete your formula.

##### Share on other sites

I have added -.25 to the script and this worked for displaying a negative number but I need to begin adding time after 15 minutes, or .25 has past.

What do I need to change in this script to make this work?

Right now this script results with a negative number until time reaches 15 minutes. I need it to be 0 (zero) until time passes 15 minute.

Round(Hour( End Break 1 - Start Break 1 ) + Minute( End Break 1 - Start Break 1 ) / 60 - Lunch fake,2)+If(End Break 1 <= Start Break 1,24,0) - .25

##### Share on other sites

This topic is 5660 days old. Please don't post here. Open a new topic instead.

## Create an account

Register a new account