Validating Date

Hi All!

Sorry, Just a beginner question.

How do you check & validate the date if out of range from 01/2020 to 12/2022
Example scenario:

Date = 12/2023 then an error message will be triggered here

Question type is date



In the Validation Conditions section, click on the “Add condition” button.
Set the condition based on the date range using the following syntax:

self >= DateTime.Parse(“2020-01-01”) && self <= DateTime.Parse(“2022-12-31”)

1 Like

It works! Thank you for this

See here for an important warning (3-rd party resource):

Correspondingly, instead of:



Hi sergiy

Thanks for your reply. But when I try your code. It has syntax error per below:

Validation condition has a syntax error.


1 Like

It’s now working, Thanks sergiy!