Select to view content in your preferred language

Unix time calculation not populating correct date in survey

361
5
03-20-2024 06:16 AM
dwold
by
Frequent Contributor

I am trying to convert Unix time to mm/dd/yyyy in a survey. I am pulling data from a feature layer into this survey using the pulldata("@layer"). I tried following this document but for some reason, my calculations are not population the correct date.

Feature Layer Dates I am pulling from:

dwold_0-1710940362425.png

Survey:

dwold_0-1710940753644.png

 

Web format:

dwold_3-1710940557982.png

@IsmaelChivite anything you see in the table that isn't allowing the conversion to be made?

0 Kudos
5 Replies
DougBrowning
MVP Esteemed Contributor

On those 2 note fields that get the times try setting the bind:type column to int.  It will treat those note fields as string in the web app by default.  This usually leads to a cocat vs a +,  Never seen it on divide but worth a shot.

Hopefully that does it.

dwold
by
Frequent Contributor

thanks @DougBrowning for the suggestion. I appreciate it! Unfortunately, that didn't do the trick. It's very puzzling why it won't convert.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Did you set the bind on the hidden fields line 12 and 13 also?

0 Kudos
dwold
by
Frequent Contributor

@DougBrowning still getting some funky output after changing the blind type to int. Very puzzling why it won't convert.

dwold_0-1711116217556.pngdwold_1-1711116233307.png

 

0 Kudos
DougBrowning
MVP Esteemed Contributor

I think you use unix time for calcs but for display you need to format it I think?

format-date()

Fits an existing date or time value to a defined format.

format-date(${previous_time}, '%H:%M')

 

https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION2_AF58C02...