I created a workflow to change the date format of a DatePicker property to YYYY-MM-DD. I used the Format Data option under Data Ops within the workflow builder. However, the output is producing an extra digit on the end of the day. So instead of outputting 7/9/2025 as 2025-07-09, it is producing 2025-07-090 or sometimes 2025-07-091. I can’t figure out why or how to fix it.
Hi @JCusson,
I think I may know what’s happening here: DD is returning the 190th day of the year, not month.
I can’t tell you why (HubSpot seems to use a library where this distinction is made), but lowercase “dd” will do the trick and return the day of the month.
Best regards
That did seem to work! As a side note, lowercase ‘mm’ also just returns ‘00’. HubSpot’s just messing with us! Thanks for your quick help.
Hi @JCusson,
Using “YYYY-MM-DD” is interpreting DD as “day of the year” (so July 9 becomes day 190, hence 2025‑07‑190). This behavior is due to the underlying date library HubSpot uses.
Switch to lowercase dd (e.g. “YYYY‑MM‑dd”). Lowercase dd correctly represents “day of the month” (so 9th → 09) and resolves the extra digit issue.
If you need a more simple way or need to handle non-date inputs, I’ve built a workflow app for this. It’s designed for easy use, no tech background needed, and also works with string type fields.
It handles edge cases like:
- 2-digit years (00-49 → 2000-2049, 50-99 → 1950-1999)
- Mixed format scenarios from imports
- Output as international formats (Taiwan’s YYYY/MM/DD, Japan’s YYYY年MM月DD日)
The native Format Data action works great for simple cases like this, but when you’re dealing with messy real-world data or need more robust date handling, a dedicated tool can save a lot of headaches!
You can install it at https://www.integration-up.com/
Hope this helps! Let me know if you need more details on the format strings.
PS. The app is currently under review, but if you encounter issues with complex date formatting, please feel free to email/DM me directly.
