# Excel Problems - Fix Date Formats

One of the most frustrating problems when working in Excel is when you encounter a spreadsheet which has messed up dates and no matter what you try the dates won't format. This often happens when converting text files to Excel or when using an Excel document with European date formatting which then can’t be converted to US format MM-DD-YY. This can be a big problem when you have large amounts of data in Excel that need to be sorted by date.

This article explains how to fix this date problem in Excel and to change the date format in excel to one that works.

## Step 1: The Problem, Excel can't recognise the date format

The following screenshot shows an Excel spreadsheet with dates that are not recognised by Excel. Excel does not recognise the full stop between each of the DD.MM.YY characters.

As shown in the below screenshot it is no use trying to format this column because Excel does not recognise the column (A) as dates.

## Step 2: Isolate the Year field

What we have to do next is separate the problematic date fields into their component parts, that is Year, Month and Day. The first step is to split the dates up, using the ‘Right’ and ‘Left’ function in Excel.

Let’s start by isolating the Year characters. First we will make a new column called Year. I then will use the RIGHT formula to isolate the last 2 characters in the date field.

The formula is as follows:

=RIGHT(A2,2)

This formula will return the 2 characters on the rightmost side of the date field (i.e. 12). Then copy this formula all the way down the spreadsheet. We have now isolated the Year.

## Step 3: Isolate the Day field

The next step is to isolate the day field. To do this we follow a similar process to Step 2 above, however instead of using the right function we will use the Left function and return the 2 leftmost characters from the date field.

The formula is as follows:

=Left(A2,2)

Copy the formula all the way down the spreadsheet. We now have separately isolated the Year and Day.

## Step 4: Isolate the month field

The next step is to isolate the month field. This is a little trickier because the characters we want to pull are in the middle of the date cell. In order to isolate the Month Characters we need to use a 2 step process.

Firstly create a column called Day and Month and use the Left Function to isolate the 5 leftmost characters.

Then copy the formula all the way down the spreadsheet. We now have a 5 character DD.MM field.

## Step 5: Isolate the month field

Next we want to split up the DD.MM field into just month. To do this we use the left function, to isolate the 2 rightmost characters in the previously created column.

Then copy the formula all the way down the spreadsheet. We now have separated our MM field.

## Step 6: Use the DATE function to put together the Year,Month and Day columns

The final step is to join our separate date elements together, to do this I want to create a new column – let’s call it ‘Fixed date’

The function we want to use to put the date back together in a usable format is the DATE function in Excel. The DATE function will separately take the Year, month and day columns and join them together into a format that Excel will recognise.

The following screenshot shows how to use the DATE function.

As we can see the DATE function has combined the individual Year, month and day fields into a recognisable date. However there is a problem, Excel is reading the 12 as the year 1912 instead of 2012. This is easily fixed. Use the DATE function again, but in the year field we want to add 100 years to column K to go from 1912 to 2012. See below screenshot for the formula to use:

Once we have fixed the formula then copy it down the rest of the spreadsheet. We now have a working date format.

Let’s now put the new fixed date into American format.

And copy the new date format down the remaining spreadsheet.

And that is. We now have a column with dates that work, instead of an unreadable date format (column A). The last step is to tidy up the spreadsheet, remove the additional columns that we don’t need and replace the original broken date column A. To do this I just cut and paste the new date column over the top of the old one, and there we have it, a spreadsheet with dates that now work and can be read by Excel.

## More excel problems

- Excel contiguous print error

This hub explains how to deal with the contiguous print error in excel. This is a common problem with an easy fix. - Excel number format problem

This hub looks at troublesome number formats in excel. A common and frustrating problem with many Excel spreadsheets is where numbers are in a format that Excel does not recognise. This hub explains how to fix this problem and put these numbers into

## Comments 3 comments

Brilliant. Honestly I never would have come up with that technique in a million years - especially the technique for getting the middle column. Thanks!

I am no expert, but I believe it is easier to use this method:

1. highlight the 'Date' column

2. click on 'Data' tab, then click on 'Text to Columns'

3. select 'Fixed width'

4.click 'Next'

5.click 'Next' again

6. select 'Date', then see the drop down for the desired Date format

7. click 'Finish'....you should be done - if not right don't save and use the method posted above!