[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Changing numbers to dates in excel

Posted on 2011-03-17
5
Medium Priority
?
280 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
  • 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

834 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