Date Field into Text

1992
0
06-22-2016 08:18 AM
StaciDratler2
New Contributor

I am using Survey 123 for field data collection. We are creating sample IDs based on a few fields and one is the date field. I have defaulted the date in the survey, but I when reference date in my code for the sample id, I get a very long 10 digit number (see attachment). We need the date in the sample id to be a 6 digit (mmddyy) format. Is there anyway to convert the date field to a text? Or is there a way to make the date field a mmddyy format without having to use the datetime type?

Code:

if(${matrix}="soil",${object_id}+"_SSPHII_00"+${depth}, if(${matrix}="soilvapor",${object_id}+"_AVPHII_00"+${depth}, if(${matrix}="e_blank","EB_BC"+${date},if(${matrix}="a_blank","AB_BC"+${date},if(${matrix}="t_blank","TB_BC"+${date},"__")))))+"_"+"01"

Thanks for any and all help.

0 Kudos
0 Replies