Input Masks for Dates

495
3
03-02-2018 03:54 AM
ManeeshMassey
New Contributor II

Hello everyone.

I have a text field in my survey form in which I users have to enter dates separated by commas. As users leave the text field, the dates they enter should be converted into a customized date format. I haven't found any examples to show how this can be done. Can someone help please?

0 Kudos
3 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Maneesh,

I'm not quite sure I understand what you are trying to accomplish - the situation is that you have a text field to capture (sample dates)

14/3/2018,31/5/2018

And then reformat to a date object?

In general, I would suggest having dates entered as date questions - that would provide the most flexibility to further process in the form.

0 Kudos
ManeeshMassey
New Contributor II

Thank you for the quick response James. I'm trying to do just what you mention. But, your suggestion to enter dates as date questions, is sure enough easy to do, however I fail to understand how one can enter 2 or more dates separated by commas? Is this possible to do? If so, how?

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Maneesh,

Sorry for the delay in response.  No, you cannot enter 2 dates into a question- they would need to be in separate questions.  I would suggest that as the recommended solution as having 2 dates joined by a comma is really only useful for human interpretation - you would need to split out the 2 dates anyway to be able to do any meaningful calculation/analysis.

0 Kudos