Regarding Date constraint

I would like to make a date constraint using the answer to another question. For example, I do not want the day when the patient starts treatment earlier (name: start_date) than the day when the patient notices the symptoms (name: noticed_date). What constraint statement should I use?

Hi @sn

On the forum, we already have many topics about date constraint. Have you read them? I'm sure it should solve your problem.

Thank you for your reply.
I added ". >= noticed_date and . <= today()" to constraint colimn referring to your advice.
However, I get an error no matter what date I enter into ODK Collect.
What should I change?

When calling a variable somewhere else in the form, you always need to use $ followed by the name of the variable between braces, i.e. ${noticed_date}
. >= ${noticed_date} and . <= today()
On a note, you can also display the date when the patient notices the symptoms in the message that will be displayed if the entered data does not meet the constraint (constraint_message column)
The date you enter should be between ${noticed_date} and today.

please attach your form if you are not able to solve the problem.

Thank you very much. I solved the problem.