Skip to main content
Nintex Community Menu Bar
Question

Date difference formula

  • February 17, 2026
  • 5 replies
  • 11 views

Forum|alt.badge.img+11

Hello,

I have recently just come across an issue with the date difference formula I have used for a couple of years now.  Its been working until now. 

Below should be 60 months but instead is 61…

Here is the formula I am using:
dateDiff([Datetime].[TotalMonths],[Form].[fromDate_GP1],dateAdd("Months",1,[Form].[toDate_GP1]))

 

 

5 replies

  • February 19, 2026

With these things it matters whether you want to round up or down, what’s the intended behaviour? 


Forum|alt.badge.img+11
  • Author
  • Scout
  • February 19, 2026

@BobR ,

 

Hello! So I need to pull the months that stand between those two dates (the same happens in the days box) entered in the “from/to” date fields.

With the formula I am using, I notice with 1 I get 61 months and if I replace the 1 with 0, I get 59 months but never 60.


  • February 19, 2026

Well yeah, that’s because if you add one month to Jan 29th 2031, you end up at Feb 29th 2031 which doesn’t exist (2031 is not a leap year), so you end up on March 1st, so more than a month after Jan 31st. Which leads me back to my question, what is the intended behaviour because there often isn’t an exact integer number of months between two dates. Getting months difference in date calculations is often messy because the length of a month varies from month to month. 

 

tl;dr: From Jan 31st 2026 to Jan 29th 2031 is slightly shorter than 5 years. The system rounds down to 59 months. From Jan 31st 2026 to Mar 1st 2031 is slightly over 61 months (60 months is to Jan 31st 2031, then more than one month to Mar 1st), so you get 61 months as the system rounds down. 


Forum|alt.badge.img+11
  • Author
  • Scout
  • February 19, 2026

@BobR ,

 

Ok, so the only intentions is to find out how many months sit between those 2 dates. I’m not sure how much more to explain that or how to handle. I guess is there something wrong with the formula I’m using? Are there any suggestions? Should I look at another way of grabbing the number of months between those 2 date fields?

 

Thanks 


Forum|alt.badge.img+11
  • Author
  • Scout
  • February 20, 2026

@BobR ,

 

Hi! Just reaching out to see if you had any updates to my last response…do I need to raise a Nintex ticket?

 

Thanks