logo
search
Data Import & Export

How to Preserve a Custom Date Format When Saving Excel CSV Files

Phi Hung VoPhi Hung Vo Oct 10, 2026 869 views

Question details

The user needs to keep specific custom date formatting intact when exporting or saving an Excel spreadsheet as a CSV file.

How to Preserve a Custom Date Format When Saving Excel CSV Files
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 you start

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.

Solution 1Recommended

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.

1
Insert a helper column

Insert a new blank column directly next to your existing dates in the Excel spreadsheet.

2
Apply the TEXT formula

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.

3
Fill the formula

Click and drag the fill handle at the bottom-right corner of the cell to apply the formula to the rest of the column.

4
Paste as values

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.

5
Save as CSV

Delete the helper column, go to 'File' > 'Save As', and choose 'CSV (Comma delimited)' from the file format dropdown menu.

Use the TEXT Function to Convert Dates to Text Before Saving
Verification Tip: Always open the resulting CSV file in Notepad or another plain text editor to verify the format. Reopening it directly in Excel may cause Excel to automatically reformat the text back into standard system dates.
Efficient Spreadsheet Management

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. 1. Open Data: Open your original dataset in WPS Spreadsheet.
  2. 2. Convert Dates: Apply the =TEXT() function in a new column to lock in your desired date format as plain text.
  3. 3. Paste Values: Copy the converted text and use 'Paste Special' > 'Values' over your original dates.
  4. 4. Export to CSV: Click 'Menu' > 'Save As' and select 'CSV' from the file type dropdown menu to export the correctly formatted data.
Perfectly compatible with Microsoft Excel (.xlsx and .csv) formats.Supports all standard Excel functions including the TEXT formula.Lightweight and fast, ideal for managing large datasets.Free to download with a familiar user interface.
microsoft office alternative - wps office

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.