Select to view content in your preferred language

Calculate DOB in excel for Survey123 Connect

803
3
11-28-2017 02:54 PM
IanBarwell
Emerging Contributor

I currently calculate DOB using the format example "December 20, 1965" but I would like the format to be like this "12/20/1965" 

Current calc looks like this, where "DOB" is the linked field

int((decimal-date-time(today()) - decimal-date-time(${DOB})) div 365.25)

0 Kudos
3 Replies
JohnathanHasthorpe
Esri Regular Contributor

Hi Eric

Add the following to the calculate field of a text or note question:

format-date(${DOB},'%m/%d/%Y')

This will be for display purposes only, but can be persisted in the feature service as a text field.

Please see the following: https://community.esri.com/groups/survey123/blog/2016/04/17/dates-and-time-in-survey123-for-arcgis for more info.

Cheers

John

JamesBorders
New Contributor

We can calculate DOB by using an online age calculator.

0 Kudos
FrankyMiller
New Contributor

Finnish people can read more about calculator on my website.

0 Kudos