Solved

Changing numbers to dates in excel

Posted on 2011-03-17
5
270 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 41

Accepted Solution

by:
dlmille earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

863 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now