I am attempting to create two variables that each capture the UTC date and time based on an esriFieldTypeDate calculation. Interestingly, the esriFieldTypeDate variable (${rovDplyEndFull}) is captured in UTC, as I expect, but another calculation formatting ${rovDplyEndFull} is reverting to local time. Here is a representation to explain:
type | name | calculation | bind::esri:fieldType |
calculate | rovDplyEndFull | once(if(${rovDplyEnd} = 'End',now(), "")) | esriFieldTypeDate |
calculate | rovDplyEndDate | format-date(${rovDplyEndFull},'%m/%d/%Y') | |
calculate | rovDplyEndTime | format-date(${rovDplyEndFull},'%H:%M:%S:%3') | |
Exporting the Excel output from Survey123 leads to this:
rovDplyEndFull | rovDplyEndDate | rovDplyEndTime |
04/11/2024 19:42:54.703 | 04/11/2024 | 15:42:54:703 |
I would expect and am looking for the result for rovDplyEndTime to be 19:42:54.703. Since our form will be used across time zones, I am hoping to capture the UTC time. Changing the bind::esri:fieldType for rovDplyEndTime to esriFieldTypeDate led to an inaccurate result of something like "December 31, 1969".
Any ideas? I'm happy to provide more information as well.