Date&Time String to Date then Date to String Bug

Having a date input of 2025-12-28 going into the Date & Time to String node will make the output string into 12/28/2026. It seems like it only happens when you customize your wanted format into the “Date format:” section.

This happens from dates 12/28/2025 - 12/31/2025, which are all changed to 2026.

Hi @ProfLazy ,

welcome to the KNIME forum.
Which pattern do you use? There is a difference between “yyyy”, which is the normal year, and “YYYY”, which is the week-based year.
In your case, it looks like you need to use “yyyy” in combination with month and day of month, i.e., “MM/dd/yyyy”.
The capital option is typically only used in combination with weeks, e.g., “YYYY-ww”. In this case in often happens that the last/first days of a year are assigned to the first/last week of the next/previous year.

Hope this helps,
nan

3 Likes

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