Convert Date to be read by Oracle

Hi,

I have some Date formatted in DD.MM.YYYY format, such as ‘16.06.2007’. In order to be read in Oracle, I need to be able to format it to the following format, like the example: ‘16-OCT-07’.

I could not find this type of format using String to Date component. Should I use Java Snippet for this or there is another simple way?

Thanks advance!

1 Like

Hi.

Do you need a date type field or a string type field with the mask DD-MMM-YY?

If the second scenario works for you, you can use a string to date node and then date to string node with the specified format (DD-MMM-YY).

Best regards,
Alex

2 Likes

Added this option to the example

2 Likes

Just convert the string to a date in KNIME with String to Date&Time node. Works fine. Just tried it.

‘16-OCT-07’ is just the format you have configured oracle to display. This can also be changed but is not needed:

ALTER SESSION SET NLS_DATE_FORMAT = ‘DD.MM.YYYY’;

2 Likes

Hi alex_never,

That worked so fine! Thank you!

Hi beginner,

Good advice, thank you!

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