?
Solved

Changing Date format in Excel

Posted on 2003-03-17
5
Medium Priority
?
834 Views
Last Modified: 2012-06-21
I have some files sent to me that have the dates as YYMMDD and I would like a Macro that will change the date to MM/DD/YYYY can any one help me?
0
Comment
Question by:akeyes
[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 1

Accepted Solution

by:
iaminit earned 1000 total points
ID: 8153498
You probably don't need a macro.  It may be that the dates are simply formatted as YYMMDD.  In this case, select the dates and then change the format:

format|cells|custom|mm/dd/yyyy

Or, if the dates are currently entered as text or numbers, use a formula to convert.  For example, if the date is in cell A1, use the formula
=DATE(LEFT(A1,2),MID(A1,3,2),RIGHT(A1,2))
Copy and paste special|values to convert from a formula to a value.  Then format as in the first case.


0
 

Author Comment

by:akeyes
ID: 8155070
I tried this format|cells|custom|mm/dd/yyyy
my 740108 and changed it to 5/6/3926.  So this did not work for me.    

0
 

Author Comment

by:akeyes
ID: 8155173
After playing around a little I was able to get this to work, Thanks.
0
 
LVL 13

Expert Comment

by:cri
ID: 8155174
akeyes, iaminit second procedure most probably will fix it.
0
 
LVL 13

Expert Comment

by:cri
ID: 8155178
I said so.
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

This article describes a serious pitfall that can happen when deleting shapes using VBA.
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

800 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