Skip to main content
Nintex Community Menu Bar

To show a negative sign with days in a Nintex calculated field

  • June 20, 2016
  • 5 replies
  • 29 views

Forum|alt.badge.img+4

I'm trying to compare two dates (Date A - Date B) and calculate days using Nintex form. I'm using "dateDiffDays"  runtime function to get days count. But it is not showing negative sign when Date A is smaller than Date B.

So this formula works to show positive, but need to find a way to show minus.

Thanks,

Swapnil

5 replies

Forum|alt.badge.img+16
  • June 20, 2016

It seems to be a bug.


Forum|alt.badge.img+6
  • June 22, 2016

Hi,

I don't know if this is a bug. It has certainly behaved this way for quite some time. My take on it is that the function name is dateDiffDays, which means that it is showing the difference between the two dates. The difference is the difference, not a positive or negative! wink.png

Anyway, try something like the below, which should give you the result you are chasing:

If(greaterThanOrEqual(date A,date B),dateDiffDays(date A,date B),-dateDiffDays(date A,date B))

Cheers,

Mark


Forum|alt.badge.img+4
  • Author
  • Rookie
  • June 22, 2016

Thanks Mark. It is working now. happy.png


Forum|alt.badge.img+4
  • Author
  • Rookie
  • June 22, 2016

Yes it is.


Forum|alt.badge.img+6
  • June 22, 2016

Glad I could help!