concatenate date

Dear All

Along with saying hello and wishing you a great weekend, I present the following query:

I present a field called “COB_FCHVENCUO” which is of type string and contains date values in DD/MM/YY format, for example 12/31/22, where 31 is the day, 12 is the month and 22 is the year 2022.

What I need is that the number 20 is concatenated correctly to the field, that is, for example, instead of appearing as 22, it should be 2022 so that it correctly gives me the date, example 12/31/2022 and not 12/31/22

An image of the problem is attached.
image

If you want to keep the column contents as a string, and you’re always prepending ‘20’ to the year, then I’d suggest the String Manipulation node.

Use the expression:

join(substr($COB_FCHVENCUO$,0,6),"20",substr($COB_FCHVENCUO$,6))

Here we’re extracting the first 6 characters from the string in COB_FCHVENCUO, adding a ‘20’ after them, then adding on the last 2 characters from the original string.

image

5 Likes

Thank you very much @elsamuel