ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Number or text to date (https://www.excelbanter.com/excel-discussion-misc-queries/140410-number-text-date.html)

Nabellfl

Number or text to date
 
I need to change 20020102 into the date format 01/02/2002. Any suggestions?

Toppers

Number or text to date
 


=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))

assuming A1 is yyyymmdd

HTH

"Nabellfl" wrote:

I need to change 20020102 into the date format 01/02/2002. Any suggestions?


Dave Peterson

Number or text to date
 
If you have a whole column of this stuff, you can select that range
data|text to columns
fixed width (but erase any lines that excel guessed)
choose date (ymd or ydm -- difficult to guess with your sample)

And finish up the wizard.

Then you can format those dates anyway you want via:
format|Cells|Number tab.

Nabellfl wrote:

I need to change 20020102 into the date format 01/02/2002. Any suggestions?


--

Dave Peterson

Nabellfl

Number or text to date
 
Worked greeat. Thank you.

"Dave Peterson" wrote:

If you have a whole column of this stuff, you can select that range
data|text to columns
fixed width (but erase any lines that excel guessed)
choose date (ymd or ydm -- difficult to guess with your sample)

And finish up the wizard.

Then you can format those dates anyway you want via:
format|Cells|Number tab.

Nabellfl wrote:

I need to change 20020102 into the date format 01/02/2002. Any suggestions?


--

Dave Peterson



All times are GMT +1. The time now is 08:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com