# Date Format Issue

**URL:** <https://forum.getodk.org/t/date-format-issue/14052>\
**Category:** Support\
**Created:** [July 16, 2018, 12:22pm UTC](https://forum.getodk.org/t/date-format-issue/14052 "2018-07-16T12:22:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![newinp](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/n/b3f665/32.png) [@newinp](https://forum.getodk.org/u/newinp)\
**Post date:** [July 16, 2018, 12:22pm UTC](https://forum.getodk.org/t/date-format-issue/14052/1 "2018-07-16T12:22:14Z")

</div>

I'm trying to change the date format from the default YYYY-MM-DD to DD/MM/YY but all my efforts are in vain. Ideally would like the display to look like DD/MM/YY, if not then the result.  
I'm using the following under Calculation column.

format-date (date, '%e/%n/%y')

Can someone suggest where I'm going wrong.

---

<div class="post-metadata">

**Author:** ![danbjoseph](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/danbjoseph/32/21901_2.png) [@danbjoseph](https://forum.getodk.org/u/danbjoseph)\
**Post date:** [July 16, 2018, 12:50pm UTC](https://forum.getodk.org/t/date-format-issue/14052/2 "2018-07-16T12:50:48Z")

</div>

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.

```plaintext
+===========+================+===============+====================================+
| 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](https://forum.getodk.org/t/-/6671).

---

<div class="post-metadata">

**Author:** ![nodari](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/nodari/32/2386_2.png) [@nodari](https://forum.getodk.org/u/nodari)\
**Post date:** [September 16, 2018, 5:04pm UTC](https://forum.getodk.org/t/date-format-issue/14052/3 "2018-09-16T17:04:15Z")

</div>

Hi there

Sorry for waking up this question but i have the exact same problem,  
this is ok when we have date question in the form but what if i have hidden questions like:  
Start - changed from 2018-09-16T16:46:38.945+04 to this: 16/09/18 16:35  
End  
Today - changed from 2018-09-16 to this: 16/09/18

i make this changes in form but still not working,

| type | name | label | hint | required | appearance | relevant | calculation |
| --- | --- | --- | --- | --- | --- | --- | --- |
| start | start | | | | | | |
| end | end | | | | | | |
| username | username | | | | | | |
| today | today | | | | | | |
| calculate | formatted\_date | | | | | | format-date(${today},'%d/%m/%y') |

---

<div class="post-metadata">

**Author:** ![danbjoseph](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/danbjoseph/32/21901_2.png) [@danbjoseph](https://forum.getodk.org/u/danbjoseph)\
**Post date:** [September 17, 2018, 1:31pm UTC](https://forum.getodk.org/t/date-format-issue/14052/4 "2018-09-17T13:31:44Z")

</div>

Hi @nodari, I tried this:

```plaintext
+-----------+-----------------+------------+-------------------------------------+
| type | name | label | calculation |
+-----------+-----------------+------------+-------------------------------------+
| date | date | Date: | |
| dateTime | datetime | Date time: | |
| start | start | | |
| end | end | | |
| today | today | | |
| calculate | format_date | | format-date(${date},'%d/%m/%y') |
| calculate | format_dateTime | | format-date(${datetime},'%d/%m/%y') |
| calculate | format_start | | format-date(${start},'%d/%m/%y') |
| calculate | format_end | | format-date(${end},'%d/%m/%y') |
| calculate | format_today | | format-date(${today},'%d/%m/%y') |
+-----------+-----------------+------------+-------------------------------------+

```

and got this (note that this was an export from kobo because that's what I had quick access to):

```plaintext
+-------------------------------+-------------------------------+------------+------------+-------------------------------+-------------+-----------------+--------------+------------+--------------+----------+--------------------------------------+---------------------+--------+
| start | end | today | date | datetime | format_date | format_dateTime | format_start | format_end | format_today | _id | _uuid | _submission_time | _index |
+-------------------------------+-------------------------------+------------+------------+-------------------------------+-------------+-----------------+--------------+------------+--------------+----------+--------------------------------------+---------------------+--------+
| 2018-09-17T09:24:16.878-04:00 | 2018-09-17T09:24:28.121-04:00 | 2018-09-17 | 2018-09-18 | 2018-09-19T09:30:00.000-04:00 | 18/09/18 | 19/09/18 | 17/09/18 | 17/09/18 | 17/09/18 | 31664559 | 602d755f-7df3-4c8d-be50-047e9387a304 | 2018-09-17T13:24:33 | 1 |
+-------------------------------+-------------------------------+------------+------------+-------------------------------+-------------+-----------------+--------------+------------+--------------+----------+--------------------------------------+---------------------+--------+

```

It seems to work. What does your data export look like? Is the field empty or incorrect or are you receiving some error?

---

<div class="post-metadata">

**Author:** ![nodari](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/nodari/32/2386_2.png) [@nodari](https://forum.getodk.org/u/nodari)\
**Post date:** [September 17, 2018, 3:59pm UTC](https://forum.getodk.org/t/date-format-issue/14052/5 "2018-09-17T15:59:18Z")

</div>

@danbjoseph thank you buddy, i will try it today and let you know all results

---

<div class="post-metadata">

**Author:** ![nodari](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/nodari/32/2386_2.png) [@nodari](https://forum.getodk.org/u/nodari)\
**Post date:** [September 19, 2018, 9:33am UTC](https://forum.getodk.org/t/date-format-issue/14052/6 "2018-09-19T09:33:34Z")

</div>

Hello

@danbjoseph i just tested this, and no success, this is the form:

| type | name | label | hint | required | appearance | relevant | calculation |
| --- | --- | --- | --- | --- | --- | --- | --- |
| start | start | | | | | | |
| end | end | | | | | | |
| username | username | | | | | | |
| today | today | | | | | | |
| calculate | format\_today | | | | | | format-date(${today},'%m-%d-%Y') |

and this is result:

start | end | username | today | format\_today  
17/09/18 14:41 | 19/09/18 13:16 | username | 17/09/18 |

sorry, it's not formatted, but shortly, not format date comes in the field

in your submission, start is like this: 2018-09-17T09:24:16.878-04:00 but when i receive submissions on the latest version of ODK its like this: 19/09/18 13:06, same for end, ☹

---

<div class="post-metadata">

**Author:** ![danbjoseph](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/danbjoseph/32/21901_2.png) [@danbjoseph](https://forum.getodk.org/u/danbjoseph)\
**Post date:** [September 19, 2018, 12:55pm UTC](https://forum.getodk.org/t/date-format-issue/14052/7 "2018-09-19T12:55:56Z")

</div>

I think your issue might be related to this change that will hopefully be out soon:

> [@Standardize on ISO8601 for date and time exports in Briefcase, Aggregate, Central](https://forum.getodk.org/t/standardize-on-iso8601-for-date-and-time-exports-in-briefcase-aggregate-central/15159):
>
> What is the general goal of the feature? As a data manager, I would like to process dates and times that use standard formats. What are some example use cases for this feature? As described at [Date format on export different on different machines (with identical setups)](https://forum.getodk.org/t/date-format-on-export-different-on-different-machines-with-identical-setups/13612), depending on the locale and version of Java you have, Briefcase will output date times in a different format. This makes it hard to write and manage downstream tools that work with the data. What can you contribute to making…

---

<div class="post-metadata">

**Author:** ![Edward\_paul](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/edward_paul/32/8963_2.png) [@Edward\_paul](https://forum.getodk.org/u/Edward_paul)\
**Post date:** [October 12, 2019, 12:31pm UTC](https://forum.getodk.org/t/date-format-issue/14052/8 "2019-10-12T12:31:25Z")

</div>

when I stuck in such troublesome situation, I searched a lot about the reason because of which I render this issue and best ways to resolve it. At that time, I have come to know that date formula not working in Excel issue arises due to following reasons. Here the reasons are:

Cause #1: Cells are formatted as text  
Cause #2: The workbook is set to Manual calculation mode

I have resolved this **[Date Format Not Changing In Excel](http://www.repairmsexcel.com/blog/solve-date-format-not-changing-in-excel)** issue trying out this solution. You can also make it a try:

• First of all, open the Excel worksheet  
• Now make a right-click on the top of the Excel column and choose the Format Cells menu  
• After choosing up the Format Cells, a Window of format cell will get open on your screen.  
• Here, choose the Date option and select the date format that you needed for that particular column.  
• Finally, make a tap on the OK option to save the format change and then close the Window.

follow this step you will surely be able to solve your date format problem in excel.
