# Changing string type date into date datatype

**URL:** <https://forum.knime.com/t/changing-string-type-date-into-date-datatype/77462>\
**Category:** KNIME Analytics Platform\
**Created:** [February 24, 2024, 6:44pm UTC](https://forum.knime.com/t/changing-string-type-date-into-date-datatype/77462 "2024-02-24T18:44:12Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikhil\_r](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/n/ed655f/32.png) [@nikhil\_r](https://forum.knime.com/u/nikhil_r)\
**Post date:** [February 24, 2024, 6:44pm UTC](https://forum.knime.com/t/changing-string-type-date-into-date-datatype/77462/1 "2024-02-24T18:44:12Z")

</div>

Dears,

I am learning KNIME and I’m getting “?” in output table while converting String type date into Date data type. Please help me to solve this.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/8/3/83b093176a369af9c2c1a71450d4f3817ba4839e.png)

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

---

<div class="post-metadata">

**Author:** ![ArjenEX](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/97f17d/32.png) [@ArjenEX](https://forum.knime.com/u/ArjenEX)\
**Post date:** [February 24, 2024, 8:09pm UTC](https://forum.knime.com/t/changing-string-type-date-into-date-datatype/77462/2 "2024-02-24T20:09:05Z")

</div>

Hi @nikhil_r

Can you please show the original format of the date? It’s hard to help right now 😉

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [February 24, 2024, 8:18pm UTC](https://forum.knime.com/t/changing-string-type-date-into-date-datatype/77462/3 "2024-02-24T20:18:20Z")

</div>

@nikhil_r have you tried letting the node guess the format?

---

<div class="post-metadata">

**Author:** ![izaychik63](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/i/e9a140/32.png) [@izaychik63](https://forum.knime.com/u/izaychik63)\
**Post date:** [February 24, 2024, 11:39pm UTC](https://forum.knime.com/t/changing-string-type-date-into-date-datatype/77462/4 "2024-02-24T23:39:44Z")

</div>

In simple case Date Extractor from Palladian

> **[Date Extractor — NodePit](https://nodepit.com/node/ws.palladian.nodes.extraction.date2.DateExtractor2NodeFactory)**
>
> Extracts date and time from text.

will do it automatically.

---

<div class="post-metadata">

**Author:** ![nikhil\_r](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/n/ed655f/32.png) [@nikhil\_r](https://forum.knime.com/u/nikhil_r)\
**Post date:** [February 25, 2024, 2:55am UTC](https://forum.knime.com/t/changing-string-type-date-into-date-datatype/77462/5 "2024-02-25T02:55:19Z")

</div>

![image](https://forum-cdn.knime.com/uploads/default/original/3X/4/4/445702859c494c5a7c9ce635874127ba5fd5c942.png)

---

<div class="post-metadata">

**Author:** ![nikhil\_r](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/n/ed655f/32.png) [@nikhil\_r](https://forum.knime.com/u/nikhil_r)\
**Post date:** [February 25, 2024, 2:56am UTC](https://forum.knime.com/t/changing-string-type-date-into-date-datatype/77462/6 "2024-02-25T02:56:55Z")

</div>

While checking for “Guess data type and format”, throwing below error

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/e/5/e5139155d32b467c16c8759a38c4fe8a5d573eac.png)

---

<div class="post-metadata">

**Author:** ![nikhil\_r](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/n/ed655f/32.png) [@nikhil\_r](https://forum.knime.com/u/nikhil_r)\
**Post date:** [February 25, 2024, 3:16am UTC](https://forum.knime.com/t/changing-string-type-date-into-date-datatype/77462/7 "2024-02-25T03:16:37Z")

</div>

![image](https://forum-cdn.knime.com/uploads/default/original/3X/b/5/b5f318d74b264cb052afbe1db086d54d8c825707.png)

getting above error.

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [February 25, 2024, 5:38am UTC](https://forum.knime.com/t/changing-string-type-date-into-date-datatype/77462/8 "2024-02-25T05:38:28Z")

</div>

@nikhil_r you can provide a [fitting pattern](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html) for your date string. Maybe you can show some examples

> [@Error in Conversion of String format to Date format](https://forum.knime.com/t/error-in-conversion-of-string-format-to-date-format/75994/13):
>
> Hi @PKRISH , please note that the case is important. You need to be careful to use the examples as they were given. So the year yyyy remains lower case. i.e. the format is: dd-MM-yyyy or d-M-yyyy (or variations of those) The single d and single M allow for day and month both as single digit, or double digit or with leading zero. If you specify dd or MM it only matches where the day / month is represented as 2 digits. i.e. d and M are less restrictive than dd and MM It’s not entirely obvio…

> **[Date & Time Integration | KNIME](https://www.knime.com/blog/the-new-date-time-integration/)**
>
> This article describes the date&time integration in KNIME offering time zone and multiple columns support, flexibility measuring time differences, auto-guessing string formats, and flow variable support.

---

<div class="post-metadata">

**Author:** ![izaychik63](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/i/e9a140/32.png) [@izaychik63](https://forum.knime.com/u/izaychik63)\
**Post date:** [February 25, 2024, 2:09pm UTC](https://forum.knime.com/t/changing-string-type-date-into-date-datatype/77462/9 "2024-02-25T14:09:58Z")

</div>

I recommended node from Palladian. You need to install Palladian first.

---

<div class="post-metadata">

**Author:** ![tqAkshay95](https://forum-cdn.knime.com/user_avatar/forum.knime.com/tqakshay95/32/67469_2.png) [@tqAkshay95](https://forum.knime.com/u/tqAkshay95)\
**Post date:** [March 12, 2024, 12:04pm UTC](https://forum.knime.com/t/changing-string-type-date-into-date-datatype/77462/11 "2024-03-12T12:04:10Z")

</div>

Hello @nikhil_r ,

can you provide sample data ?

---

<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 10, 2024, 12:05pm UTC](https://forum.knime.com/t/changing-string-type-date-into-date-datatype/77462/12 "2024-06-10T12:05:06Z")

</div>

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