Select to view content in your preferred language

Date and time formatting

193
2
Jump to solution
10-10-2024 01:21 PM
Bio_GIS
Emerging Contributor

Hey all, I am in need of some help with a quick formatting issue. I've got the following printing out in my reports for a datetime field:

"April 18, 2024 11:08AM"

However, I only want to print the time portion. The problem is they're contained all within one variable as such:

${survey_start} and ${end_time}

How would I extract just the time of day?

0 Kudos
1 Solution

Accepted Solutions
ChristopherCounsell
MVP Regular Contributor

If you are using survey123 report templates

${datetime | format:"HH:mm"}

Where datetime is your field value.

https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereporttemplates.htm

View solution in original post

2 Replies
DavidSolari
Frequent Contributor

Check out the format codes for the format-date function.

ChristopherCounsell
MVP Regular Contributor

If you are using survey123 report templates

${datetime | format:"HH:mm"}

Where datetime is your field value.

https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereporttemplates.htm