normalizing dates

tuxedo76

New Member
Joined
Dec 18, 2010
Messages
11
I have an Excel 2007 file with 15,000 building permits from 1885 to 1945. I'm trying to clean up the data a bit. I have a column called "Date" but there's a whole mish-mash of date formats. Most of them, unfortunately, are like this: "04-Apr-1892". It appears it is as text, not in a date format.

Since I have so many in that format, any suggestions on how I can normalize those "text fields" so that "04-Apr-1892" (as text) will be "04/04/1892" (as a date)?

Thanks!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Select the entire "Date" column only
Select from the menu Data\Text to Columns
  • Step 1 of 3: Delimited
  • Step 2 of 3: un-check all of the delimiters
  • Step 3 of 3: Column data format; Date
  • Finish

This will convert all the Text-Dates into serial dates. There may be some date formats that Excel can't convert with this method. You may have to manually change those or use a formula. If you need help on those, give specific details.
 
Upvote 0
For many date formats, you can do Data > Text to Columns, Finish, and Excel will convert text that looks like dates to dates, and then you can format them as you wish.

Unfortunately, though, Excel's dates start at Jan 0, 1900, and so won't recognize anything prior as a date, even if you enter them manually, e.g., 4/4/1892.

In VBA, dates can go back to the year 100, but I don't see how that would help.
 
Upvote 0
Hi there,

Thanks for the quick response. I followed your instructions and it appears that many of the cells were in fact converted to "Date" format.

However, I still have lots (and lots) of cells like this: "17-Apr-1891"; "07-Jul-1890"; "08-Dec-1877"; etc.

Regarding the comment about Excel not recognizing any dates before 1900, is there any work-around for that? In essence, after I've cleaned up my data, I'd like to run pivots showing, say, "how many building permits were granted in Washington, DC in the year 1888".

Thanks!


Kelly
 
Upvote 0
One way would be to put the year in a separate column as an integer. You could extract it with one formula from the post-1900 dates (=year(a1)) and a different formula for the pre-1900 dates which will be, per force, text (e.g., =--right(A1, 4)). You could pivot on that.

Edit: Walkenback has an add-in that supports pre-1900 dates. See http://books.google.com/books?id=dt...&resnum=3&ved=0CBwQ6AEwAg#v=onepage&q&f=false

Not sure how that would work for a pivot table.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,432
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top