PDA

View Full Version : How do I convert non-date string to a Date?


jakester
Sep 10, 2009, 12:26 PM
Hi -

Okay, so here's my issue. I have a non-date string that I'd like to convert to a date format. This is what my non-date string looks like: 2009-01 and 2009-02, etc.

I'd like to convert that to Jan-2009 or 01/09 under the date format.

Can I do this?

JBeaucaire
Sep 10, 2009, 09:24 PM
1) Highlight all the dates
2) Click on Data > Text to Columns
3) Select Delimited > Next
4) Select Next
5) In Column Data format select Date: YMD
6) Click Finish

You've just converted the text strings into ACTUAL Excel date values. You will most likely see:
Jan-09
Feb-09

7) Press Ctrl-1 to open the Format Cells window
8) Select Number tab
9) Choose Category: Custom and enter mmm-yyy in the Type: box

You will now see your date values as:
Jan-2009
Feb-2009

NOTE: Since your original text strings had no "day values, they will all be the first day of the month. Click on any one of these new cells and look in the formula bar, you'll see what I mean.