Select to view content in your preferred language

Survey123 not capturing time in the date&time question

334
9
Jump to solution
08-21-2024 09:17 AM
MelanieBass
Occasional Contributor

I have created a survey in the survey123 web designer and chose the date and time question and made it required and read only. When I click the data page, it shows the time captured in the field. However, when I view the hosted layer that it creates with the results it does not show the time only the date. I looked at the field type for it on the hosted layer and it says just date. I am assuming that this is the problem, but I don't know how to change it. We are currently on Enterprise 11.1. The first picture is the survey results inside of survey123 webdesigner. The second picture is the hosted layer it created the form_form version. 

MelanieBass_0-1724256975416.pngMelanieBass_1-1724256993731.png

 

0 Kudos
1 Solution

Accepted Solutions
JenniferAcunto
Esri Regular Contributor

I think someone changed how the field is displayed for your layer.

From the Item Details page, click on Visualization. 

Be sure you are on the Layers panel and your layer is selected.

layers.jpg

 

Click on the Fields Icon in the right panel.

Click on your date and time field and ensure that Show Time is checked.

 

date format.jpg

 

Save.

Below is the table view from the item details w/o and w/ Show time enabled.

result.jpg

- Jen

View solution in original post

0 Kudos
9 Replies
Koen
by Esri Contributor
Esri Contributor

Hey @MelanieBass , I was able to do some tests on my end (in ArcGIS Online, not enterprise) and was not able to reproduce the issue. I see in the second screenshot you provided that there is a date_time field, I believe this to be the title of the question in the survey, as per my screenshot below, the question title for my survey was "untitled_question_3"

Koen_0-1724258016721.png

When I go to the "Data" tab, then click "Table" at the top right I do see the date and time fields populated correctly. If you do not see this populated in the table tab, please provide a screenshot of what it does look like. Thank you. 

Koen_1-1724258161733.png

 

 

0 Kudos
MelanieBass
Occasional Contributor

MelanieBass_0-1724266116763.png

the ones that are missing it completely are correct. they didn't have that question in the survey when that submission was done. 

0 Kudos
abureaux
MVP Frequent Contributor

"Date" is just the name of the field "Type". The "Date" type, in this context, can include time.

I can only think of two places off-hand where data from S123 would be available by default: The Surveys Site, and the Feature Layer on the Portal. The data should be the same in both locations, but you are saying you see differences between those locations? Can you provide a screen cap comparing the two?

0 Kudos
MelanieBass
Occasional Contributor

MelanieBass_1-1724266276278.pngMelanieBass_2-1724266303688.png

 

0 Kudos
abureaux
MVP Frequent Contributor

I'm wondering if this is Portal settings somehow?

I did a test where I published from the web, added both a dateTime and date question, and did some submissions. Ignoring that one blank field, I actually have the reverse issue where my date field has time associated with it:

abureaux_0-1724270282961.png

EDIT: I tried publishing from Connect, and got the same result.

abureaux_1-1724270692968.png

In both cases, I submitted from both Field App and Web. The only difference I noticed was that submitting from the Web defaults the time for date questions to 12:00, and submitting from the Field App uses system time.

0 Kudos
abureaux
MVP Frequent Contributor

Oh, and I forgot to address your other question about different data appearances.

So, the Surveys Site does show time differently than Portal. The Surveys Site looks at the data type, and displays accordingly. The Portal doesn't seem to do that.

In this particular case, that means the Surveys Site displays only the date for date questions, and Portal displays date and time for date questions. In both cases, time is collected for date questions.

In the Surveys site, you can still see the time component of a date question by clicking into it:

abureaux_2-1724270954214.png

Seems odd to me that time get recorded for date questions... It also occurs to me that I almost never use date only questions!

0 Kudos
JenniferAcunto
Esri Regular Contributor

Survey123 doesn't yet support the new date fields, so all date information is captured as a date/time entry. When you pick the Date question type it will default to noon of that day. 

- Jen
0 Kudos
JenniferAcunto
Esri Regular Contributor

I think someone changed how the field is displayed for your layer.

From the Item Details page, click on Visualization. 

Be sure you are on the Layers panel and your layer is selected.

layers.jpg

 

Click on the Fields Icon in the right panel.

Click on your date and time field and ensure that Show Time is checked.

 

date format.jpg

 

Save.

Below is the table view from the item details w/o and w/ Show time enabled.

result.jpg

- Jen
0 Kudos
MelanieBass
Occasional Contributor

OMG! Thank you so much for the help. I had no idea. I was beginning to think I was going to have to redo my work. 

0 Kudos