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


Badge +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

Userlevel 6
Badge +16

It seems to be a bug.

Badge +6

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

Badge +4

Thanks Mark. It is working now. happy.png

Badge +4

Yes it is.

Badge +6

Glad I could help!

Reply