When converting string to date format using string to Date/Time node,the format for date column changed to yyyy-mm-dd from dd-mm-yyyy.
String to Date&Time node converts string column type to Local Date Time column type (in your case to Local Date only cause you have no time part) for which
yyyy-MM-dd is representation in KNIME. To check column representations in KNIME go File --> Preferences --> KNIME --> Preferred Renderers
If you use old (legacy) Time&Date format you can get something closer to your desired output but I would not recommend it as it will soon become depreciated…
Date & Time setting is already in dd.MMM.yyyy format only, check below image for reference. Do i need to change any setting here.
The default and standard date and time format in KNIME follows ISO8601.
The “Date and Time” option in KNIME preferences that you have in the screenshot refers to the legacy format. To transform Date&Time to legacy Date&Time, use Date&Time to legacy Date&Time node.
Used Date&Time to legacy Date&Time node but the format changed as shown below
But i want same format which is in date string
The options are these three formats:
dd.MMM.yyyy (MMM like Jul, Aug, …)
To work with date and time in KNIME I suggest that you keep the standard format in ISO8601 and when you want to export the table elsewhere in your desired format (dd-MM-yyyy) then change the format. That would be easy to be done in a String Manipulation node with this expression:
join(substr($column1$, 8,2), "-", substr($column1$, 5,2), "-", substr($column1$, 0,4))
Where “column1” is your date column.
This will change 2018-12-01 to 01-12-2018
Why? What is the use case that demands this format to be used with the internal date representation? As @armingrudd points out, you can convert it when you need it in that format and, presumably, you have converted it to internal format to manipulate it as a date rather than a text string.
i have date column in other table which represents same format,so i want to have consistent look in the data for joining based on date column…
Please correct me if i am thinking wrongly
But date column in other table is string then, isn’t it? Have both columns either String or either Date&Time but in same format for joining reasons.
Yes ipazin, Date column in other table is string but it has to be in same format for joining reasons.
so you should have both columns as Date&Time in which case they will be same format and you will be able to join and additionally use Date&Time nodes/manipulations over them or you can have both columns string in which case you need to make them in same format if not already using String Manipulation node.