# Format Date in Write To Excel Template

**URL:** <https://forum.knime.com/t/format-date-in-write-to-excel-template/67239>\
**Category:** KNIME Analytics Platform\
**Created:** [May 19, 2023, 1:28pm UTC](https://forum.knime.com/t/format-date-in-write-to-excel-template/67239 "2023-05-19T13:28:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![albpesca\_knime](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/4bbf92/32.png) [@albpesca\_knime](https://forum.knime.com/u/albpesca_knime)\
**Post date:** [May 19, 2023, 1:28pm UTC](https://forum.knime.com/t/format-date-in-write-to-excel-template/67239/1 "2023-05-19T13:28:56Z")

</div>

i’m experiencing an issue when writing a field of type “date” into an excel  
file.  
Actually i write the field of type date with the node “Write To Excel  
Template”.  
Into the template file the column is formatted as a date in italian format  
dd/MM/yyyy.  
Knime writes the date but the excel file shows it in the format yyyy-mm-dd  
but excel doesn’t recognized it as a real date…  
and only by clicking double into a cell,it shows the date in the desired  
format.  
Do you know why? Is there a correct way to write a date in italian format and  
having excel that recognize it correctly?  
Thank you all!

---

<div class="post-metadata">

**Author:** ![aworker](https://forum-cdn.knime.com/user_avatar/forum.knime.com/aworker/32/36421_2.png) [@aworker](https://forum.knime.com/u/aworker)\
**Post date:** [May 19, 2023, 1:34pm UTC](https://forum.knime.com/t/format-date-in-write-to-excel-template/67239/2 "2023-05-19T13:34:54Z")

</div>

Hi @albpesca_knime & welcome to the forum

The following recent topic addresses exactly the problem you described with various proposed solutions:

> [@Change the date format of the output report](https://forum.knime.com/t/change-the-date-format-of-the-output-report/67074):
>
> Hi, I have been googling for hours now to find a right solution on my knime problem. How will I change the date format of the output report from yyyy-MM-dd to dd-MM-yy. I tried date&time to string node to get the format that I prefer. But when I use string to date&time node, the date format goes back to the original format. Need help.

Hope it helps.

Best  
Ael

---

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [May 19, 2023, 4:49pm UTC](https://forum.knime.com/t/format-date-in-write-to-excel-template/67239/3 "2023-05-19T16:49:11Z")

</div>

Hi @albpesca_knime , and welcome!

Further to the information in the thread mentioned by @aworker , one of the suggestions leads to the use of the “Continental Nodes” for XLS Formatting, (as noted there by @iCFO) . These nodes are very powerful and can achieve what you require, but there can be a bit of a learning curve initially as you need to know how to create “tags” for the cells, or cell ranges that you wish to format.

The trouble I had was that I needed to do this very occasionally and then I could never remember _how to do_ what I needed to do!

For this reason, I created a component that works with the Continental Nodes, and does all the hard work of generating tags, to cover most scenarios, so you don’t really have to think too hard about it.

> **[XLS Control Table Auto Tag Generator – takbb](https://hub.knime.com/takbb/spaces/Public/Components/XLS%20Control%20Table%20Auto%20Tag%20Generator~c1-dDj6FECcGzMYq/current-state)**
>
> XLS Control Table Auto-Tag Generator Use this in conjunction with the Continental Nodes to directly generate a control table populated with tags based on data …

Add it to workflow like this:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/2/9/29b21eae1e7abac993770c646d92420a45e06b40.png)

The second data output port supplies tags to cover most scenarios from the input data. For date columns, it will generate a tag named “ **t:Local Date** ”. The created tags can then be referenced using the Continental XLS Cell Formatter node, by connecting this port, along with the green “XLS Formatter” port. The upper port is your data which must be passed to an Excel Writer, and then the created XLSX file (without formatting) is used by the XLS Formatter node to generate a formatted XLSX file.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/c/9/c94452c834ba3144b62eb50ec4ea1438f9c3c70f.png)

In the attached demo workflow, you can see that the date is formatted as required:  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/4/e/4efe80f8663c3af9b59957ffc0fd710f7b5cfcd4.png)

![image](https://forum-cdn.knime.com/uploads/default/original/3X/a/c/accca6f32d803d6168f565b7f46ae24c7f2e888e.png)

[Formatting Excel Dates.knwf](https://forum.knime.com/uploads/short-url/sZLiVc6dluemLjBL8UbZvG2AmRl.knwf) (113.7 KB)

You may still find you need to understand a little bit about how this works, so a more detailed post about using the Auto Tag Generator component is available here:

> [@Auto generating common tags for Continental XLS Formatting Nodes](https://forum.knime.com/t/auto-generating-common-tags-for-continental-xls-formatting-nodes/47590):
>
> I hadn’t really got into using the Continental XLS Formatting nodes for my own work until about a week ago. They are a great extension to KNIME, but I just had not really had a need to format my output spreadsheets. I’d tried to assist on the odd forum thread but never felt I could just go format a spreadsheet “on demand” without having to go back and re-read the tutorials or examples to remind myself how it worked. Even when I might have wanted to, I put it in the “too-hard” basket and decided…

---

<div class="post-metadata">

**Author:** ![iCFO](https://forum-cdn.knime.com/user_avatar/forum.knime.com/icfo/32/36036_2.png) [@iCFO](https://forum.knime.com/u/iCFO)\
**Post date:** [May 19, 2023, 5:14pm UTC](https://forum.knime.com/t/format-date-in-write-to-excel-template/67239/4 "2023-05-19T17:14:02Z")

</div>

Very cool component @takbb !

Thanks for that share.

---

<div class="post-metadata">

**Author:** ![AnotherFraudUser](https://forum-cdn.knime.com/user_avatar/forum.knime.com/anotherfrauduser/32/16912_2.png) [@AnotherFraudUser](https://forum.knime.com/u/AnotherFraudUser)\
**Post date:** [May 22, 2023, 6:36pm UTC](https://forum.knime.com/t/format-date-in-write-to-excel-template/67239/5 "2023-05-22T18:36:49Z")

</div>

@albpesca_knime beside the already answered workaround - could you provide an example workflow for this? Will check to fix it in the node as well

---

<div class="post-metadata">

**Author:** ![Daniel\_Weikert](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/d/e47c2d/32.png) [@Daniel\_Weikert](https://forum.knime.com/u/Daniel_Weikert)\
**Post date:** [May 23, 2023, 3:59pm UTC](https://forum.knime.com/t/format-date-in-write-to-excel-template/67239/6 "2023-05-23T15:59:53Z")

</div>

By the way is it already compatible with version5?  
br

---

<div class="post-metadata">

**Author:** ![AnotherFraudUser](https://forum-cdn.knime.com/user_avatar/forum.knime.com/anotherfrauduser/32/16912_2.png) [@AnotherFraudUser](https://forum.knime.com/u/AnotherFraudUser)\
**Post date:** [May 23, 2023, 4:22pm UTC](https://forum.knime.com/t/format-date-in-write-to-excel-template/67239/7 "2023-05-23T16:22:27Z")

</div>

🙈 hopefully this weekend  
had a bit of a hold up due to vacation  
Hope will not be the last one to provide it to Steffen 😅

---

<div class="post-metadata">

**Author:** ![albpesca\_knime](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/4bbf92/32.png) [@albpesca\_knime](https://forum.knime.com/u/albpesca_knime)\
**Post date:** [June 12, 2023, 3:56pm UTC](https://forum.knime.com/t/format-date-in-write-to-excel-template/67239/8 "2023-06-12T15:56:02Z")

</div>

Dear @takbb , thank you very much for the great solution! It worked very well!!!

---

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [June 12, 2023, 7:07pm UTC](https://forum.knime.com/t/format-date-in-write-to-excel-template/67239/9 "2023-06-12T19:07:37Z")

</div>

You’re welcome @albpesca_knime , I’m glad it worked for you

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [June 19, 2023, 7:08pm UTC](https://forum.knime.com/t/format-date-in-write-to-excel-template/67239/10 "2023-06-19T19:08:20Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
