What you are saying happened is not possible. Numbers does not use 5 digit numbers for dates. There is no cell format to turn a 5 digit number into a date nor one to turn a date into a 5 digit number. Numbers will import Excel's 5-digit numeric dates by turning them into actual dates but that's the end of it, they become dates and the numbers are gone.
It is much more likely that you opened an Excel file using Numbers (i.e., imported an Excel file) and it did not turn the numbers into dates like it was supposed. This happens sometimes with older Excel files for reasons unknown. Some people open then re-save their file using LibreOffice before importing to Numbers, which seems to fix whatever is wrong with the file. Others change the dates after exporting by creating a temporary column and using a formula. It is also possible you opened an older version of your Numbers file (which had to have been imported from Excel) and this version was prior to you changing the numbers into dates.
For example, if your dates are in column A,
- Insert a new column B in your table.
- In all cells of column B put the formula =DATE(1899,12,30)+A
- Double check to make sure these are the correct dates, not off by a few days or 4 years (Excel also used a date format based on the year 1904)
- Select the dates in column B and Copy
- Paste Formula Results to column A (it is in the Edit menu).
- Delete column B