How to Preserve a Custom Date Format When Saving Excel CSV Files
Question details
The user needs to keep specific custom date formatting intact when exporting or saving an Excel spreadsheet as a CSV file.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Saving an Excel workbook containing custom-formatted dates as a CSV file for data export.
- Observed behavior
- CSV files strip Excel formatting, and Excel reinterprets or alters the date values automatically when the saved CSV file is reopened.
Before exporting to CSV, ensure your original Excel workbook is saved as an .xlsx file so you do not lose your original formulas and cell formatting.
Use the TEXT Function to Convert Dates to Text Before Saving
Converting your dates into a text string prevents Excel from dropping the format during the CSV export.
CSV (Comma Separated Values) files only store raw text and values, meaning all Excel-specific cell formatting is lost upon saving. To force the CSV to keep your precise date format, you must convert the date into plain text first.
Insert a new blank column directly next to your existing dates in the Excel spreadsheet.
In the first cell of the new column, type the formula =TEXT(A2, "dd-mm-yyyy h:mm") (replace A2 with your actual date cell and adjust the format between the quotes as needed), then press Enter.
Click and drag the fill handle at the bottom-right corner of the cell to apply the formula to the rest of the column.
Copy all the new text dates, right-click the original date column, and select 'Paste Special' > 'Values' to replace the dynamic formulas with static text.
Delete the helper column, go to 'File' > 'Save As', and choose 'CSV (Comma delimited)' from the file format dropdown menu.

Easily Manage CSV Files and Date Formats with WPS Spreadsheet
WPS Office provides a highly compatible and lightweight spreadsheet tool that makes converting, formatting, and exporting CSV data seamless. You can use standard functions like TEXT to manipulate data precisely before exporting.
- 1. Open Data: Open your original dataset in WPS Spreadsheet.
- 2. Convert Dates: Apply the =TEXT() function in a new column to lock in your desired date format as plain text.
- 3. Paste Values: Copy the converted text and use 'Paste Special' > 'Values' over your original dates.
- 4. Export to CSV: Click 'Menu' > 'Save As' and select 'CSV' from the file type dropdown menu to export the correctly formatted data.

Frequently Asked Questions
Why does my CSV file show a different date format when I reopen it in Excel?
When you open a CSV file in Excel, the software automatically detects date-like strings and converts them into your system's default short date format. The original CSV data is usually unchanged, which you can verify by opening it in Notepad instead of Excel.
Can I apply a custom cell format directly to save in CSV?
No, CSV is a plain text format and does not save custom cell formatting, colors, or formulas. You must convert the formatted values into hardcoded text before saving to preserve how they look.
How do I check the actual contents of my exported CSV file?
Right-click the saved .csv file on your computer, select 'Open with', and choose Notepad (on Windows) or TextEdit (on Mac). This displays the raw, unformatted text data exactly as it was saved, bypassing Excel's automatic formatting engines.




