Date Format Issue

You'll need to have a second calculate type question. The word "date" in the function needs to be changed to a data reference that pulls in the answer from your date type question. If you want the day and month to be zero-padded (that is, 06/07/18 instead of 6/7/18), then you'll want to change '%e/%n/%y' to '%d/%m/%y'. If you're using Microsoft Excel and it recognizes the cells as being dates, it may auto-format and you'll need to use the cell formatting options to adjust the appearance.

+===========+================+===============+====================================+
|   type    |      name      |     label     |            calculation             |
+===========+================+===============+====================================+
| date      | my_date        | Input a date: |                                    |
+-----------+----------------+---------------+------------------------------------+
| calculate | formatted_date |               | format-date(${my_date},'%d/%m/%y') |
+-----------+----------------+---------------+------------------------------------+

Also, welcome to the ODK forums! I'd be great if you could please take a minute to add a profile picture and introduce yourself.

2 Likes