Select to view content in your preferred language

Record time in correct time zone

9857
14
Jump to solution
03-27-2019 10:18 AM
WhitneyWeber
Frequent Contributor

When collecting data via my Survey123 with a field type of dateTime and bind::esri:fieldType of esriFieldTypeDate, the time displays correctly, but is recorded 4 hours different (presumably UTC). How do I get the recorded data to reflect the correct time zone? Do I need to record it in a different field of type calculate with something like now().toLocaleString or now()+int(2400) (2400 because 60*4hours)? I would think this would be a common question, but can't find it anywhere.

Tags (2)
0 Kudos
14 Replies
wild_ecology
New Contributor

Hi Toby, did you ever figure out a solution? I'm running into the same error message.


@TobyStewart2 wrote:

Hi James

Sorry to open an old post but I used the above in a survey and it all goes through Ok, except when I test the submission of the survey and I get the following error

"bigint is incompatible with datetime2"

Any suggestions?


 

0 Kudos
IvanZamora
New Contributor

Got the same problem. All works fine if I fill the survey from the app but if I want to fill it from the browser fo people who can acces to the app, this bignit error comes. Did you solve the problem?

Sorry for open a very old conversation

0 Kudos
MaxwellMoore
New Contributor

Can you please provide an explanation of how to use this in a survey that has a repeat section? The example provided causes the date/time to be blank in the main survey download and I am confused by the explanation provided to Whitney for their survey. Please. 

0 Kudos
GaryEnnis
New Contributor

This solution worked for me. Thanks James.

0 Kudos
WhitneyWeber
Frequent Contributor

Sorry, I forgot to mention that I have visit_date with a default value of now(). I did not repeat that in the visit_date_local field, assuming it pulls it from the visit_date field.

0 Kudos