Hi all,
I'm trying to create a formula to add on to a scheduling template I'm using. There is already a field for Monday hrs, Tuesday Hrs, etc. Formatted like this:
Hi all,
I'm trying to create a formula to add on to a scheduling template I'm using. There is already a field for Monday hrs, Tuesday Hrs, etc. Formatted like this:
And actually, upon more investigation, the above mentioned formula for the total daily hours is faulty - It can't divide into half hours; for some reason it defaults to round down to the closest hour, which is problematic. Surprising for a template that airtable provides. Anyone know how to fix this?
Hi @Jay108 ,
For example, something like this
IF({Monday Start} = BLANK(), 0,
IF(DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes')/60 > 5,
DATETIME_DIFF({Monday End}, DATEADD({Monday Start}, 30, "minutes"), 'minutes')/60,
DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes')/60)
)
Hi @Jay108 ,
For example, something like this
IF({Monday Start} = BLANK(), 0,
IF(DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes')/60 > 5,
DATETIME_DIFF({Monday End}, DATEADD({Monday Start}, 30, "minutes"), 'minutes')/60,
DATETIME_DIFF({Monday End}, {Monday Start}, 'minutes')/60)
)
Thanks so much @Sho
Using the minutes / 60 worked great for getting the correct values. The above formula didn't work, but I just used this in the regular "Monday Hrs" field and it corrected the values:
Now, to deduct the half hour lunch, I created a separate field "Pay Hours" and I tried this:
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.