format-date capturing local time, not UTC

153
0
04-11-2024 01:43 PM
lkline
by
New Contributor

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:

typenamecalculationbind::esri:fieldType
calculaterovDplyEndFullonce(if(${rovDplyEnd} = 'End',now(), ""))esriFieldTypeDate
calculaterovDplyEndDateformat-date(${rovDplyEndFull},'%m/%d/%Y') 
calculaterovDplyEndTimeformat-date(${rovDplyEndFull},'%H:%M:%S:%3') 


Exporting the Excel output from Survey123 leads to this:

rovDplyEndFullrovDplyEndDaterovDplyEndTime
04/11/2024 19:42:54.70304/11/202415: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.

Tags (4)
0 Kudos
0 Replies