I’m using pulldata(“layer“) to get 3 attribute values on previous record stored in the survey feature service. This works well for all 3 attribute values in Survey123 Connect and Survey123 Mobile App.
But I encounter an issue with a date calculation in the Survey123 Web App: the previous date is not displayed and the calculation of the duration between it and the current day is not displayed either.
These date and duration work well in Survey123 Connect and Mobile App :
I understood that the Survey123 web app only supports decimal time : https://doc.arcgis.com/en/survey123/desktop/create-surveys/decimaldatetime.htm
I also read @IsmaelChivite's article on this subject : https://community.esri.com/t5/arcgis-survey123-blog/dates-and-time-in-survey123/ba-p/895528
Please help me 😊
Solved! Go to Solution.
I succeeded after a lot of tries using the following formula to calculate the date field (previous_date_signalement): date-time(int(${date_pulldata}) div 86400000)
decimal-date-time() converts a date object to a decimal date-time number. You're passing a text value from date_pulldata into the decimal-date-time().
I think you need to convert the text value to a date before passing it into the decimal-date-time function?
Thanks for your help @ChristopherCounsell.
I try this expression : date(decimal-date-time(date(${date_pulldata}))) but same issue.
I succeeded after a lot of tries using the following formula to calculate the date field (previous_date_signalement): date-time(int(${date_pulldata}) div 86400000)