Skip to main content
Nintex Community Menu Bar

Check if textbox contains valid date?

  • August 10, 2017
  • 2 replies
  • 72 views

Forum|alt.badge.img+8

I'm trying to figure out how I can set a validation rule to check if a Single Line Textbox contains a valid date or not. I should probably use a date control but in this case I need it to be a textbox. Can someone help me figure out what the validation rule would consist of?

The date is currently put into the box automatically in the proper standard format of MM/DD/YYYY but I have to allow it to be typed in as well. 

2 replies

Forum|alt.badge.img+3
  • August 10, 2017

try this...use a hidden date field and check it's value when populated from the text field.

Enter txt date field in this form "yyyy/mm/dd" 

Example "1999/02/28" 

Then use formula translate(txt_fieldvalue., "/", "-") set date field


Forum|alt.badge.img+14
  • Scholar
  • August 10, 2017

you can write a validation rule with formula like

not(isDate(convertToDate(DateTextControl)))