?
Solved

Changing numbers to dates in excel

Posted on 2011-03-17
5
Medium Priority
?
275 Views
Last Modified: 2012-05-11
Hi,
I have a number representing an expiry date that is sent from a supplier in a CSV file.  For example 20130228 represents and expiry date of 28/02/2013.  When I try and format this to a date in excel all I get is a load of hash marks (see screenshot) Screenshot of the cell once it has been formatted as a date.
How do I get this data into an excel date format?
0
Comment
Question by:ianlee1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 24

Expert Comment

by:jimyX
ID: 35155390
Insert a new column next to that column (column J) and insert the following formula and copy down:

=RIGHT(I2,2)&"/"&MID(I2,5,2)&"/"&LEFT(I2,4)

And then Copy this new column (J) and Past Special and select "Values" at Column I.
0
 
LVL 42

Accepted Solution

by:
dlmille earned 2000 total points
ID: 35155393
its a text string.

Try this formula

=Date(left(I2,4),mid(I2,5,2),right(I2,2)) to convert the string in I2 to a date.  You might insert a column at J and put this formula in, then copy down.

Dave
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 35155416
Try using "Text to columns" functionality to convert without an extra column.

Select column of dates then use

Data > Text to columns > Next > Next > at step 3 choose "Date" option under "column adta format" and then "YMD" from the dropdown > OK

Now you can format as required

regards, barry
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 35155424
sorry that should be "column data format".....
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35155533
Nice one barry
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question