Help

Date Diff Rounded By Month

963 1
cancel
Showing results for 
Search instead for 
Did you mean: 
DanielP
6 - Interface Innovator
6 - Interface Innovator

I have 2 date columns…

Date 1, Date 2
2020-10-01, 2023-02-01
2019-04-01, 2022-03-31

I’m using the formula specified here to output the difference in years/months…

IF(AND({Date 1}, {Date 2}), DATETIME_DIFF({Date 2},{Date 1}, 'years') & ' years & ' & (DATETIME_DIFF({Date 2},{Date 1}, 'months') - DATETIME_DIFF({Date 2},{Date 1}, 'years')*12) & ' months')

It currently outputs “2 years & 4 months” for Column 1 (correct), and “2 years & 11 months” for Column 2 (incorrect). Column 2 is 1 day off 3 years exactly, and I need a way to round it to the nearest month. Any ideas would be very much appreciated.

1 Reply 1
DanielP
6 - Interface Innovator
6 - Interface Innovator

P.s. the fact that the dates 2021-02-01 and 2023-02-28 display “2 years & 0 months” suggests that months are being rounded down, but instead I want to round up