Convert utc time to local time

776
3
11-23-2021 09:47 PM
TobyStewart2
New Contributor II

I know this one has been covered a lot and Ive been trying to get a calculation from a previous answer to work but so far it just gives me an empty field.

now()+pulldata("@property", "utcoffset")*1000*60*60

I'm trying to create a hidden field from Survey 123 Connect that when I open the Feature Layer in Pro will have the converted DateTime field showing my local time etc when the survey result was captured.

So far it just turns up blank o matter what I try??

 

0 Kudos
3 Replies
IsmaelChivite
Esri Notable Contributor

Hi. Try the following:

  • Option 1: Create a text question and use the calculation to store a string using format-date
  • Option 2: Create a datetime question and apply your expression to the calculation

IsmaelChivite_0-1638206893470.png

If you want to hide your calculated value, apply the hidden appearance to your question. Do not use the hidden question type, use the hidden appearance instead.

IsmaelChivite_1-1638207277387.png

 

0 Kudos
TobyStewart2
New Contributor II

Thanks for your reply @IsmaelChivite 

I followed the steps you provided above and it all looks good in the survey but once the survey is submitted and I access the Feature Layer either in AGOL or in ArcPro the "My date plus offset" field is empty. Thanks

TobyStewart2_0-1638225740719.png

 

0 Kudos
TobyStewart2
New Contributor II

Hi @IsmaelChivite 

Have you had a similar issue as my response? when getting the survey results in Pro or AGOL?

 

0 Kudos