# Error String to Date & Time Node

**URL:** <https://forum.knime.com/t/error-string-to-date-time-node/32024>\
**Category:** KNIME Analytics Platform\
**Created:** [April 9, 2021, 4:13am UTC](https://forum.knime.com/t/error-string-to-date-time-node/32024 "2021-04-09T04:13:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Omprakash\_Jena](https://forum-cdn.knime.com/user_avatar/forum.knime.com/omprakash_jena/32/24657_2.png) [@Omprakash\_Jena](https://forum.knime.com/u/Omprakash_Jena)\
**Post date:** [April 9, 2021, 4:13am UTC](https://forum.knime.com/t/error-string-to-date-time-node/32024/1 "2021-04-09T04:13:38Z")

</div>

Hi,

I have a dataset with some date columns in string format like **Apr 11, 2021**. I am unable to convert those using the string to date&time node in KNIME. Anyone can please help.

Note that in the date columns I have some missing cells, wherever there is missing the final output should be missing as well.

Many Thanks!  
Omprakash Jena

---

<div class="post-metadata">

**Author:** ![elsamuel](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/e/b4bc9f/32.png) [@elsamuel](https://forum.knime.com/u/elsamuel)\
**Post date:** [April 9, 2021, 4:56am UTC](https://forum.knime.com/t/error-string-to-date-time-node/32024/2 "2021-04-09T04:56:02Z")

</div>

Can you share your workflow and/or your data? I have no issues doing this conversion.  
Try using the date format that matches your string: MMM dd, yyyy

---

<div class="post-metadata">

**Author:** ![Omprakash\_Jena](https://forum-cdn.knime.com/user_avatar/forum.knime.com/omprakash_jena/32/24657_2.png) [@Omprakash\_Jena](https://forum.knime.com/u/Omprakash_Jena)\
**Post date:** [April 9, 2021, 5:11am UTC](https://forum.knime.com/t/error-string-to-date-time-node/32024/3 "2021-04-09T05:11:06Z")

</div>

Thanks @elsamuel for the quick response!

I was trying with **MMM DD, YYYY** and getting the error. Now, as you suggested I tried with **MMM dd, yyyy** and its working for the cells where the string is **Apr 11, 2021**. However its not working where the string is in **Apr 9, 2021**. I have mentioned a sample data below -

Apr 9, 2021  
Aug 7, 2021  
Oct 2, 2021  
Apr 30, 2021  
Apr 15, 2021  
May 25, 2021  
? (missing)  
? (missing)  
? (missing)

Many Thanks!  
Omprakash Jena

---

<div class="post-metadata">

**Author:** ![elsamuel](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/e/b4bc9f/32.png) [@elsamuel](https://forum.knime.com/u/elsamuel)\
**Post date:** [April 9, 2021, 5:19am UTC](https://forum.knime.com/t/error-string-to-date-time-node/32024/4 "2021-04-09T05:19:04Z")

</div>

In your original post you said that you had strings with 2 digit dates, so that’s the format I suggested.  
Now you’re saying you also have single digit dates, I would try switching the format to `MMM d, yyyy`.

---

<div class="post-metadata">

**Author:** ![Omprakash\_Jena](https://forum-cdn.knime.com/user_avatar/forum.knime.com/omprakash_jena/32/24657_2.png) [@Omprakash\_Jena](https://forum.knime.com/u/Omprakash_Jena)\
**Post date:** [April 9, 2021, 5:20am UTC](https://forum.knime.com/t/error-string-to-date-time-node/32024/5 "2021-04-09T05:20:48Z")

</div>

Thanks @elsamuel ! Now it worked with **MMM d, yyyy**. Please let me know if this format is incorrect for the given dataset above.

Many Thanks!  
Omprakash Jena

---

<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:** [October 8, 2021, 5:21pm UTC](https://forum.knime.com/t/error-string-to-date-time-node/32024/6 "2021-10-08T17:21:34Z")

</div>

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