This handles all of the circumstances except for the 9.40 one. My user can't finish a job the same time he starts one, so he had to end this one at 11:55 am, so he could start the next one at 12, giving me a .4 number. Is there a way to edit my formula to round any decimal under .5 to .5, and anything over .5 to the next whole number?
5 件の回答
Try this then -
FLOOR(Total_Time__c) +
IF(
Total_Time__c - FLOOR(Total_Time__c) <= 0.1, /* [0.1 => 0] */
0,
IF(
Total_Time__c - FLOOR(Total_Time__c) <= 0.6, /* [0.11 <= X <= 0.60 => 0.5] */
0.5,
1 /* [0.61 <= X <= 0.99 => 1] */
)
)