App for time tracking

Hello,

I have a timesheet app and i am wondering if i can limit the input on the minutes to be ending by 0s or 5s. What I mean is that instead of an employรฉe saying he started at 08:02 I want that it is limited to 08:00 or 08:05. I already disabled the seconds. Thanks in advance

0 7 445
7 REPLIES 7

hello i tried to apply this formula in my app but i get an error parameter 1 of function minute is of the wring type. From what i see it is the format of my column but i do not understand where i am wrong.

You wonโ€™t be able to us ethat perfectlyโ€ฆ itโ€™s for a duration columnโ€ฆ you will need to ADAPT it to fit your needs.

@LeventK Can you help out, I haven;t done this in awhile!

@Andrian_Andreev
Assuming that your column type is TIME, try with this expression:

IF(
	MOD(MINUTE([TIME] - "00:00:00"),5) = 0,[TIME],
	IF(
		(CEILING(MINUTE([TIME] - "00:00:00") / 5) * 5) + 5 = 60,
		TIME(HOUR([TIME] - "00:00:00") + 1 & ":00"),
		TIME(HOUR([TIME] - "00:00:00") & ":" & ((CEILING(MINUTE([TIME] - "00:00:00") / 5) * 5) + 5))
	)
)

@Andrian_Andreev
You can also implement and use the above expression as an initial value of your TIME column:

IF(
	MOD(MINUTE(TIMENOW() - "00:00:00"),5) = 0,[TIME],
	IF(
		(CEILING(MINUTE(TIMENOW() - "00:00:00") / 5) * 5) + 5 = 60,
		TIME(HOUR(TIMENOW() - "00:00:00") + 1 & ":00"),
		TIME(HOUR(TIMENOW() - "00:00:00") & ":" & ((CEILING(MINUTE(TIMENOW() - "00:00:00") / 5) * 5) + 5))
	)
)

it is not working. The formula is accepted but i think the problem is here : i replaced your column time by my column witch means begging but the app thinks of the โ€œ00:00:00โ€ as 12/30/1899 12:00:00 AM.

IF this condition is true:
โ€ฆ(MOD(
โ€ฆMINUTE(
โ€ฆ(The value of column โ€˜Debutโ€™ - โ€œ12/30/1899 12:00:00 AMโ€)
โ€ฆ5)) is equal to (0)
THEN use the value of:
โ€ฆThe value of column โ€˜Debutโ€™
ELSE use the value of:
โ€ฆIF this condition is true:
โ€ฆ(((CEILING(
โ€ฆ(MINUTE(
โ€ฆ(The value of column โ€˜Debutโ€™ - โ€œ12/30/1899 12:00:00 AMโ€) / 5) * 5 + 5) is equal to (60)
โ€ฆTHEN use the value of:
โ€ฆTIME(
โ€ฆThe concatenation of all these text values (
โ€ฆ(HOUR(
โ€ฆ(The value of column โ€˜Debutโ€™ - โ€œ12/30/1899 12:00:00 AMโ€) + 1
โ€ฆ":00")
โ€ฆELSE use the value of:
โ€ฆTIME(
โ€ฆThe concatenation of all these text values (
โ€ฆHOUR(
โ€ฆ(The value of column โ€˜Debutโ€™ - โ€œ12/30/1899 12:00:00 AMโ€)
โ€ฆ":"
โ€ฆ((CEILING(
โ€ฆ(MINUTE(
โ€ฆ(The value of column โ€˜Debutโ€™ - โ€œ12/30/1899 12:00:00 AMโ€) / 5) * 5 + 5)
โ€ฆ

Top Labels in this Space