Help

DATETIME DIFF - Rounding up between months

Topic Labels: Formulas
1165 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Sean_Comerford
5 - Automation Enthusiast
5 - Automation Enthusiast

I’ve seen one or two topics touching on this, hoping to see if there is a workaround here. Using DATETIME DIFF appears to be rounding down the resulting unit by default. For example, calculating the number of months between 1/1/2015 and 12/31/2015 results in “11.0” with no possible means to round up to the more accurate “12” due to the result being rounded down. Is there a possible workaround for this that is capable of producing a value (maybe “11.9”?) that can then be used in conjunction with ROUNDUP to round up to the nearest whole number?

1 Reply 1

An imprecise way to do it would be: DATETIME_DIFF({Date 2}, {Date 1}, "days")/30

That results in decimal value, which you could round anyway you’d like.