# Problem with the format of excel data export

**URL:** <https://forum.dimagi.com/t/problem-with-the-format-of-excel-data-export/12305>\
**Category:** Users\
**Created:** [April 26, 2026, 8:40am UTC](https://forum.dimagi.com/t/problem-with-the-format-of-excel-data-export/12305 "2026-04-26T08:40:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TARBANGDO\_FELIX](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@TARBANGDO\_FELIX](https://forum.dimagi.com/u/TARBANGDO_FELIX)\
**Post date:** [April 26, 2026, 8:40am UTC](https://forum.dimagi.com/t/problem-with-the-format-of-excel-data-export/12305/1 "2026-04-26T08:40:07Z")

</div>

I set up an export of my database for the output of dates in French (DD-MM-YYYY) using the functions: format-date(date(#form/Date\_enqute), "%d/%m/%Y")  
But I export the data in Excel, the dates are always in AAA-DD-MM format.  
In addition, when the surveyor is entered, for example 01/12/2026: the data appears on export from 12/01/2026.

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![SupportBot\_bot](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/s/9de0a6/32.png) [@SupportBot\_bot](https://forum.dimagi.com/u/SupportBot_bot)\
**Post date:** [April 26, 2026, 8:41am UTC](https://forum.dimagi.com/t/problem-with-the-format-of-excel-data-export/12305/2 "2026-04-26T08:41:32Z")

</div>

I'll help you with this Excel data export formatting issue. Let me first check the knowledge base for information about date formatting in exports.

Thank you for reaching out! I can see you're experiencing an issue with date formatting in your Excel data exports. This is a common problem that relates to how Excel interprets date data.

## The Issue

The problem you're encountering has two parts:

1. **Excel Auto-Formatting** : Even though you're using `format-date(date(#form/Date_enqute), "%d/%m/%Y")` to format dates as DD/MM/YYYY, Excel is applying its own date formatting based on your system's locale settings.

2. **Date Reversal** : When a surveyor enters "01/12/2026", the export shows "12/01/2026" because Excel is interpreting the date according to its own locale (likely switching between DD/MM/YYYY and MM/DD/YYYY formats).

## Understanding format-date

The `format-date` function correctly formats dates as **text strings** for display within CommCare (like in forms or case lists). However, when data is exported to Excel:

- If the exported value looks like a date to Excel, Excel will try to reformat it according to the computer's regional settings
- Excel may interpret the string and convert it back to its own date format

## Recommended Solutions

### Option 1: Force Text Format in Excel

After exporting, you can tell Excel to treat the column as text:

1. Select the date column in Excel
2. Right-click and choose "Format Cells"
3. Select "Text" as the format
4. This should preserve your DD/MM/YYYY format

### Option 2: Add Non-Numeric Characters

Modify your `format-date` expression to include text that prevents Excel from recognizing it as a date:

```auto
concat("Date: ", format-date(date(#form/Date_enqute), "%d/%m/%Y"))

```

or

```auto
concat(format-date(date(#form/Date_enqute), "%d/%m/%Y"), " ")

```

(adding a space at the end)

### Option 3: Export Different Format

Use a format that's less ambiguous, like:

```auto
format-date(date(#form/Date_enqute), "%Y-%m-%d")

```

This YYYY-MM-DD format is more universally recognized and less likely to be misinterpreted.

## Reference

You can find more details about the `format-date` function and its formatting options in the CommCare documentation: [CommCare Functions - format-date](https://dimagi.atlassian.net/wiki/spaces/commcarepublic/pages/2143957589/CommCare+Functions#format-date)

Let me know if any of these solutions work for you, or if you need further assistance!

---

<div class="post-metadata">

**Author:** ![TARBANGDO\_FELIX](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@TARBANGDO\_FELIX](https://forum.dimagi.com/u/TARBANGDO_FELIX)\
**Post date:** [April 26, 2026, 9:22am UTC](https://forum.dimagi.com/t/problem-with-the-format-of-excel-data-export/12305/3 "2026-04-26T09:22:34Z")

</div>

> [@SupportBot\_bot](#):
>
> `format-date(date(#form/Date_enqute), "%Y-%m-%d")`

Thanks for helping/

1. In my system the parameters of my computer are set up on DD/MM/YYYY.
2. I set up 2 exports (survey and collection) on the same commcare account and on the same computer. The export of the sample database is correct with dates in DD-MM-YYYY, whereas the "survey" database exports in YYYY-DD-MM format.

---

<div class="post-metadata">

**Author:** ![kaleb\_white](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/k/b4bc9f/32.png) [@kaleb\_white](https://forum.dimagi.com/u/kaleb_white)\
**Post date:** [April 29, 2026, 11:14pm UTC](https://forum.dimagi.com/t/problem-with-the-format-of-excel-data-export/12305/4 "2026-04-29T23:14:41Z")

</div>

Hey there!

My name is Kaleb and I am on the CommCare Support Team!

I’d love to look into the issue you are experiencing in further detail. Do you mind submitting a ticket to [support@dimagi.com](mailto:support@dimagi.com)? Be sure to include your project space, exports you are analyzing, as well as any additional information you think could be relevant. I will be sure to take a look and get back to you.

Best,

Kaleb
