The highest number allowed in Excel for a date is 2958465.99999999. Numfmt enforces this by checking if value >= 2958466 and erroring if this is the case. However, Excel errors beyond 2958465.99999421 when the format string isyyyy-mm-dd. Numfmt does not do this.
Likely, this is because Excel checks for errors after rounding for the format has occurred, but numfmt is testing the unchanged input value.
The highest number allowed in Excel for a date is 2958465.99999999. Numfmt enforces this by checking if
value >= 2958466
and erroring if this is the case. However, Excel errors beyond 2958465.99999421 when the format string isyyyy-mm-dd
. Numfmt does not do this.Likely, this is because Excel checks for errors after rounding for the format has occurred, but numfmt is testing the unchanged input value.
Here is a table of max values for formats: