Exporting Excel Date Format to CSV

The typical extension that you will see for the Excel file is .xlsx. If you are dealing with macros, you can stumble upon .xlsm (Macro-enables files) as well. The data can be stored in other ways as well, and one of those is CSV (comma-separated values).

The data in this data file has some downsides as well. One of them is that, when we want to export an Excel file to CSV format, dates will not be preserved, but rather just converted to numbers. In the example below, we will show how to prevent this from happening.

Exporting Excel Date Format to CSV

First thing first, we will create random numbers in columns A and B:

These numbers all refer to one month period, so we need to change their format in order to present the dates. We will do that by selecting the cells, right-clicking, and then choosing Format Cells:

On the window that appears, we will go to the Number tab, and then choose the date, and pick the format:

As a final result, we will have our numbers formatted as dates:

These dates refer to the period of May 1st of 2022 to May 31st of 2022.

To save our data in CSV format, we will go to File in the Excel menu, then go to Save as or Save a Copy (this depends on the version used):

In the dialog box that appears, we will choose the location in which we will save the CSV file, and we will choose CSV (*.csv) file format:

We will click on the Save button to save the file and we will have our new file created in our folder:

When we open our CSV file, this is what we will end up with:

We can also open our newly saved files in Notepad, to verify how they will appear in CSV. We will right-click on the file that we saved, go to Open with, and choose Notepad:

When we open this file, we will have a representation of data that is separated by a comma:

Tomasz Decker is an Excel specialist, skilled in data analysis and financial modeling.