You’re on the right track. The issue is that DATETIME_DIFF() formula returns whole integers for any unit specifier, so simply trying to use a round up or similar won’t work.
What we can do is use the time difference in a calculation, something that does return decimals, and then format our output to integer.
So if we instead of days, ask the formula to calculate the hour difference, add 24 hours (instead of 1 day) and devide that by 24, we can now get outputs with decimals if we want.
You’re on the right track. The issue is that DATETIME_DIFF() formula returns whole integers for any unit specifier, so simply trying to use a round up or similar won’t work.
What we can do is use the time difference in a calculation, something that does return decimals, and then format our output to integer.
So if we instead of days, ask the formula to calculate the hour difference, add 24 hours (instead of 1 day) and devide that by 24, we can now get outputs with decimals if we want.
Note that this will only affect the formatting of the number. If you use the number in a different formula, the decimal value will be used. Also, the formatting will round the number, and some values will round down instead of up.
Note that this will still have issues if the time is less than a full hour. For example, if the duration is 24 and a quarter hours, you will get one day instead of two.
Dear Kuovonne and momentsgoneby80. It Works very well . Many thanks for your Help :partying_face: .
Welcome to the Airtable community!
To ensure that the time does not influence the calculation you can use a combination of DATETIME_PARSE and DATETIME_FORMAT
Note that this will only affect the formatting of the number. If you use the number in a different formula, the decimal value will be used. Also, the formatting will round the number, and some values will round down instead of up.
Note that this will still have issues if the time is less than a full hour. For example, if the duration is 24 and a quarter hours, you will get one day instead of two.