Select to view content in your preferred language

Calculation works in Connect, but not in browser

54
1
yesterday
alyssajhnsn
Occasional Contributor

I'm aware the issue likely has something to do with decimal-date-time, but I haven't found a workaround yet. I have a date question and I want to calculate the length of homelessness in months based off the start date. It works in Survey123 Connect

screenshot 1.png

In the browser it gives me a nonsense number or a 0.

screenshot 4.png

The survey itself is very long and complicated, so I don't want to share the full thing. But this is the relevant section in the XLSForm.screenshot 3.png

0 Kudos
1 Reply
Neal_t_k
Frequent Contributor

Your calculation is in epoch, and only decimal date works for the web.

There is a good explanation of the two on this page:

https://community.esri.com/t5/arcgis-survey123-blog/dates-and-time-in-survey123/ba-p/895528

Edit:

something like this: int((decimal-date-time(today()) - decimal-date-time(${days_homeless})) div 30.44)

0 Kudos