How to Handle Excel-Style Date Numbers in Zenphi
In most cases, if you want to change the format of a date in Zenphi, you can simply use:
👉 Format Date/Time
If the value is a string, you first use:
Convert to Date/Time → then
Format Date/Time
This works well for standard date formats like 2024-06-01, 01/06/2024, etc.
But what if your “date” looks like this: 46000? 🤔
A customer ran into this recently. They had a value like 46000, and Format Date/Time didn’t work — because it wasn’t actually a date or a string representing a date.
So… what is it?
📊 It’s a Serial Date from Excel or CSV
In Excel (and some CSV exports), dates are sometimes stored as a number — the number of days since January 1, 1900.
For example:
46000 = May 6, 2026
That’s why Zenphi couldn’t recognize it using the usual actions.
âś… How to Handle It in Zenphi
Here’s a simple workaround:
Use Convert to Number (if your value is a string like "46000")
Use Add Time to Date
Base Date: December 31, 1899
Add Days: Your number (e.g., 46000)
Select Format: choose the date format you want (e.g., yyyy-MM-dd, MM/dd/yyyy, etc.)
And that’s it! 🎉
đź’ˇ Why December 31, 1899?
Excel counts 1 as January 1, 1900 — so to get the right result, we use the day before that as the starting point.
Hope this helps! Let us know if you run into similar cases — happy to help. 🙌