How to Stop Excel from Changing Entered Dates and Ignoring Leading Zeros
Question details
The user wants to stop Excel from improperly treating six-digit date entries (such as 110121) as standard numbers and discarding their leading zeros.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Entering dates in a compact six-digit format to save time during manual data entry.
- Observed behavior
- Excel interprets the six-digit string as a standard numeric value, dropping any leading zeros and failing to recognize it as a valid date serial number.
Determine whether you need the entered data to function as real dates for chronological sorting and calculations, or if you simply need them to visually display as text with leading zeros intact.
Apply an Unambiguous Custom Date Format
Use Excel's custom formatting options to force dates to display clearly, preventing regional setting confusion and standardizing appearance.
Excel handles dates as serial numbers based on your system's regional settings. Applying a custom date format ensures that dates are displayed consistently, regardless of the computer viewing the file.
Highlight the cells or entire column where you plan to enter or display your dates.
Right-click the highlighted area and choose 'Format Cells' from the context menu, or press Ctrl+1 on your keyboard.
Navigate to the 'Number' tab, select 'Custom' from the category list on the left, and type 'dd-mmm-yyyy' (e.g., 11-Jan-2021) or 'dd/mm/yy' in the Type box. Click OK.

Format Cells as Text Before Entry
Formatting cells as text ensures that Excel records your exact keystrokes, preserving leading zeros for entries like 010121.
Enforce Consistent Input Using Data Validation
Force users to enter correctly formatted dates instead of raw six-digit numbers by applying strict data validation rules.
Easily Control Date Formats with WPS Spreadsheet
WPS Spreadsheet provides robust, intuitive cell formatting tools that give you full control over how dates and numbers with leading zeros are displayed, ensuring accurate data entry every time.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your existing spreadsheet or create a new blank document.
- 2. Select the cells to format: Highlight the specific columns or cells where your dates will be entered.
- 3. Access cell formatting: Right-click the selected range and click on 'Format Cells' to open the formatting dialog box.
- 4. Apply a custom date format: Under the Number tab, select 'Custom', input a clear date format like 'dd/mm/yyyy' or 'dd-mmm-yyyy', and click OK to apply.

Frequently Asked Questions
Why does Excel automatically remove the leading zero from my date entries?
Excel automatically interprets strings of digits as standard numerical values. Because leading zeros do not add mathematical value to whole numbers, Excel removes them by default unless the cell is specifically pre-formatted as Text.
Can I automatically convert a 6-digit number like 110121 to a real date?
Excel does not natively convert a continuous string of six digits into a date just by typing it. To convert existing six-digit numbers, you can use the 'Text to Columns' feature under the Data tab and set the column data format to Date, or use a custom VBA macro to parse the digits.
How do I stop dates from changing format when opening my file on another computer?
Date displays can swap between DD/MM and MM/DD based on the local computer's Windows regional settings. To prevent this, apply a custom format like 'dd-mmm-yyyy' (which displays as 11-Jan-2021) so the date remains unambiguous across all regions.




