I need to add a constraint to a dateTime field that only allows a date that is at least 15 days after the submittal date. I am trying to use this calculation:
.>=(today() + (1000 * 60 * 60 * 24 * 15))
but get a 'Please enter a valid value' message now when trying to enter ANY date.
Can anyway determine what I'm doing wrong? I modified a formula in the Constraints section here:
https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm
Thanks!
Solved! Go to Solution.
Have you taken a look at this Blog?
https://community.esri.com/t5/arcgis-survey123-blog/dates-and-time-in-survey123/ba-p/895528
I found it very useful when setting a calculation for 30 days past the user-inputted date.
Hope this helps
This is what I use for 7 days.
${CalibrationDate} < date(decimal-date-time(now()) - 7)
I looked again and I had that in a relevant.
My constraint is similar though
. < date(decimal-date-time(${SondeDateTimeCollected}) + 1)
Mine is date.
I think I got this to work though
. > date(decimal-date-time(now() + (1000 * 60 * 60 * 24 * 15)))
Hope that does it
Have you taken a look at this Blog?
https://community.esri.com/t5/arcgis-survey123-blog/dates-and-time-in-survey123/ba-p/895528
I found it very useful when setting a calculation for 30 days past the user-inputted date.
Hope this helps