# Excel export date format

**URL:** <https://community.easymorph.com/t/excel-export-date-format/876>\
**Category:** General Q&A\
**Created:** [January 2, 2019, 8:32am UTC](https://community.easymorph.com/t/excel-export-date-format/876 "2019-01-02T08:32:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lcaroli](https://community.easymorph.com/letter_avatar_proxy/v4/letter/l/da6949/32.png) [@lcaroli](https://community.easymorph.com/u/lcaroli)\
**Post date:** [January 2, 2019, 8:32am UTC](https://community.easymorph.com/t/excel-export-date-format/876/1 "2019-01-02T08:32:05Z")

</div>

Hi,  
I have a problem.

I want to export an excel file with some column as date and I want that Excel can use the standard capabilities on this field (example: automatic aggregation by month using the filters).

Which function I need to use?

I tried to use:

- date(): when I open the Excel it has the date columns in number format

- format(date\_as\_number, 'MM/dd/yyyy'): when I open Excel it has the date in text format

Thanks  
Leonardo

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [January 2, 2019, 5:59pm UTC](https://community.easymorph.com/t/excel-export-date-format/876/2 "2019-01-02T17:59:22Z")

</div>

Hi Leonardo,

dates in EasyMorph are actually numbers, just like in Excel. Therefore, you can export number dates in EasyMorph into a spreadsheet and then simply apply necessary formatting in Excel. No special functions are necessary.

See this tutorial chapter with more explanation about dates in EasyMorph: [EasyMorph | Type system and expressions](https://easymorph.com/learn/expressions.html)

\*\*\*\* moved to #General Q&A

---

<div class="post-metadata">

**Author:** ![lcaroli](https://community.easymorph.com/letter_avatar_proxy/v4/letter/l/da6949/32.png) [@lcaroli](https://community.easymorph.com/u/lcaroli)\
**Post date:** [January 3, 2019, 5:33pm UTC](https://community.easymorph.com/t/excel-export-date-format/876/3 "2019-01-03T17:33:11Z")

</div>

Thank you for the support.

But the problem is that I want to open Excel and to find the column directly in date visualization.

Following your solution :

> [@dgudkov](#):
>
> you can export number dates in EasyMorph into a spreadsheet and then simply apply necessary formatting in Excel

I need to apply the formatting in the Excel before the automatic file sharing to the users.  
I think the way is a macro in Excel called from Easy Morph.

Correct ?

thanks  
Leonardo

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [January 3, 2019, 8:34pm UTC](https://community.easymorph.com/t/excel-export-date-format/876/4 "2019-01-03T20:34:06Z")

</div>

EasyMorph doesn't format data when it exports it to Excel spreadsheet. Although, you can create a macro and run it using PowerShell from EasyMorph.

Here is an example of PowerShell script to run an Excel macro: [https://stackoverflow.com/questions/19536241/calling-excel-macros-from-powershell-with-arguments](https://stackoverflow.com/questions/19536241/calling-excel-macros-from-powershell-with-arguments)

Check out also this topic: [Importing password-protected xlsx](https://community.easymorph.com/t/importing-password-protected-xlsx/373)

Note that this method only works in EasyMorph Desktop. It doesn't work on EasyMorph Server.
