Skip to main content
Nintex Community Menu Bar

Rule for checking for past date?

  • February 22, 2017
  • 5 replies
  • 42 views

Forum|alt.badge.img+8

Is there any way to check if a user entered a past date?    I tried using the dateDiffDays function but it seems to always return a positive number regardless of the position of the arguments.

I am using Version: 2.8.1.0 of the designer.

5 replies

Forum|alt.badge.img+9
  • February 22, 2017

Use Compare To validation in Nintex Forms Control settings:

199749_pastedImage_1.png


Forum|alt.badge.img+8
  • Author
  • February 22, 2017

Thanks for the quick reply.  I tend to use rules.   I think it is a bad idea to mix rules with validation but looks like I am stuck.  

But I also have to know if the date entered is no greater than 3 weeks from today.   But there is no dateAddDays function in validation!!    Any other way to do this?    I guess I can use a rule for that but would rather not.

Nintex seems to be a nice product over all but some of its quirks drive me insane.   The fact that dateDiffDays   only returns an absolute value is inexcusable.   And some functions existing in one area but not the other is simply mind numbing.


Forum|alt.badge.img+10
  • February 23, 2017

I think it is possible if you validate using javascript.


Forum|alt.badge.img+9
  • February 23, 2017

Please try following formula in rule:

lessThan(date_ctrl, Current Date) || dateDiffDays(date_ctrl, Current Date) > 21


Chris_Ben
Nintex Employee
Forum|alt.badge.img+14
  • Nintex Employee
  • February 28, 2017

Hi Bruce,

Looks like Manfred has provided a good answer.  If it's correct, could you please mark it correct so future searches come up with this answer?

You could request the dateAddDays feature (and more) via UserVoice.  I don't fancy your chances of changing dateDiff though as the new behaviour may break lots of legacy workflows.

Cheers,

Chris