A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to change a date from 19990812 to 08-12-1999?



 
 
Thread Tools Display Modes
  #1  
Old August 25th, 2008, 08:58 PM posted to microsoft.public.excel.worksheet.functions
bcmsmom
external usenet poster
 
Posts: 1
Default How to change a date from 19990812 to 08-12-1999?

Trying to change a date in cells that are downloaded as 19990812 to
08-12-1999? Anybody have a way of doing it? Changing format doesn't work.
  #2  
Old August 25th, 2008, 09:07 PM posted to microsoft.public.excel.worksheet.functions
Ken Wright
external usenet poster
 
Posts: 199
Default How to change a date from 19990812 to 08-12-1999?

Just select all the dates at once (Whole column if you want) and do Data /
Text To Columns / Delimited or Fixed width (Either will do) / Then choose
"Date" and pick either YMD or YDM, whichever one works for you and your
settings (YMD for me)

Regards
Ken..................................
..

"bcmsmom" wrote in message
...
Trying to change a date in cells that are downloaded as 19990812 to
08-12-1999? Anybody have a way of doing it? Changing format doesn't
work.



  #3  
Old August 25th, 2008, 09:08 PM posted to microsoft.public.excel.worksheet.functions
John C[_2_]
external usenet poster
 
Posts: 1,350
Default How to change a date from 19990812 to 08-12-1999?

It is probably because it is text. Try the following:
Assuming your value is in A1.
=TEXT(DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2)),"mm-dd-yyyy")

Or, you could just use the formula:
=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))

And format the cell through your menu as normal.

Hope this helps.
--
John C


"bcmsmom" wrote:

Trying to change a date in cells that are downloaded as 19990812 to
08-12-1999? Anybody have a way of doing it? Changing format doesn't work.

  #4  
Old August 25th, 2008, 10:32 PM posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\)[_1188_]
external usenet poster
 
Posts: 1
Default How to change a date from 19990812 to 08-12-1999?

Trying to change a date in cells that are downloaded as 19990812
to 08-12-1999? Anybody have a way of doing it?


Assuming your value is in A1.
=TEXT(DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2)),"mm-dd-yyyy")


Because the OP has his date components in the "universal date" order, a
shorter TEXT function solution exists...

=--TEXT(A1,"0000-00-00")

Rick

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:21 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.