cancel
Showing results for 
Search instead for 
Did you mean: 
kmccool
Nintex Newbie

Calculated Value If date is less than 12/31/2017

Jump to solution

Hey Everyone,

I'm struggling to get this calculated value working. My formula is: If(date<12/31/2017,field*.535,field*.545)

Basically if the date entered is less than a certain date, I would like it to calculate using the first value, and if it's not I would like it to calculate with the second value.

However, my calculation always ends up the same amount no matter if it meets the condition or not.

I've tried:

If(TransDate<12/31/2017,Miles*.535,Miles*.545)

If(lessThanOrEqual(TransDate,12/31/2017),Miles*.535,Miles*.545)

Thanks for the help!

Kassie

Update:

ok, I thought maybe instead of combining the if and the calculation, I would just make two calculated value fields and add rules to hide or show the calculation. the rule is lessThanOrEqual(Date,12/31/2017).

this isn't working either. Is there something funky I need to know about using date fields for rules?

Thanks again

Kassie

Tags (1)
0 Kudos
Reply
2 Replies
Automation Master
Automation Master

Re: Calculated Value If date is less than 12/31/2017

Jump to solution

if you have written dates in a form just like you posted above, then note they are not taken as dates by the rule engine, but rather as math expressions that divide 3 figures. so you compare dates with a value like 0.000192 (12/31/2017).

you should use ConvertToDate() function to make date out of a string, like ConvertToDate("12/31/2017").

note however, ConvertToDate() is buggy in recent forms version(s), and your formulas need not work even that way.

Reply
kmccool
Nintex Newbie

Re: Calculated Value If date is less than 12/31/2017

Jump to solution

Again, Thanks for your help Marian.

The convert to date is working. Here's how I changed my formula: If(greaterThanOrEqual(TransDate,convertToDate("12/31/2017")),Miles*.535,Miles*.545)

Kassie

Reply