Converting string to datetime with "month name"

I’m scratching my head on how to convert this string to datetime, it should be fairly simple I guess but I don’t find how to convert the month in text format. Any solution please?

image

Hi @CDPRIN

Take a look at this wf. Hopte this helps timestamp.knwf (29.5 KB)
gr.
Hans

3 Likes

Hi @CDPRIN,

Are the two digits after the month name representing the year? If yes, You can either use the String to Date/Time (legacy) node and input this date format:
ddMMMyy:HH:mm:ss

Or use the String Manipulation node with this expression:
capitalize($column1$, "0123456789")

And then use the String to Date&Time node with the date format I have already mentioned.

Here is an example:
string_date.knwf (21.6 KB)

:blush:

3 Likes

Hi,
Thanks for your reply. The legacy variant unfortunately had a lot of missing values after transformation (about 20 %), see below.
image

Using string manipulation together with String to Date&time node worked perfect (0 missing), although I had to add “0” in the string manipulation node :).

Thanks!

1 Like

Ah, right. Missed it, sorry. I just edited the expression in my first reply.

I just tested the rows with missing value and it worked fine for me.

:blush:

3 Likes

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