How to validate a date?

  • Asked
  • Active
  • Viewed 4171 times
0

Hi!

I want to ensure that the date entered in a "date" is between 01 January 2010 and 31 December 2010.

I added a validation rule that reads: $this >='01/01/2010' and $this <= '12/31/2010' but I always get an error message whether I am in 2010 or not.

Any idea of what I need to change?

Many thanks,

Florence

0

Accepted answer

Hi Florence,
The format for the date is this: 'yyyyMMdd'
E.g. '20170505'.

Thanks,
Open Foris Team

0

Accepted answer

Many thanks Open Foris team, for the answer and your super responsiveness!!

Florence

Your answer

Markdown text. Shortcuts: Ctrl+B bold, Ctrl+I italic, Ctrl+K link, Ctrl+E code, Ctrl+Shift+V paste as plain text. Tab indents list items and code; press Escape, then Tab, to leave the text box.

Insert an image

Say what the image shows, for people who can't see it.

Keyboard shortcuts

Anywhere

?
Show this list
/
Search
g h
Go to the home page
g q
Go to the questions
g t
Go to the tags
g u
Go to the users
a
Ask a question

Lists of questions

j k
Next or previous question
Enter
Open the question

Question pages

j k
Next or previous post

Shortcuts never apply while you type in a text field. Members can turn them off in their preferences.