ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to change date as general "200306" to date "06/2003" (https://www.excelbanter.com/excel-discussion-misc-queries/30770-how-change-date-general-%22200306%22-date-%2206-2003%22.html)

Delwyn

How to change date as general "200306" to date "06/2003"
 
I recieve data with a date formated as general that looks like "200306". I
need to change it to a date format that looks like this "06/2003"

How do I do this

Earl Kiosterud

=DATE(LEFT(A2, 4),RIGHT(A2,2),1)

This will actually return a date for Jun 1, 2003, which you can format for
"06/2003" with Format - Cells - Number - Custom:
mm/yyyy.

Or if you don't want a for-real Excel date, you can just convert the text
string:

=RIGHT(A2,2) & "/" & LEFT(A2,4)



--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Delwyn" wrote in message
...
I recieve data with a date formated as general that looks like "200306". I
need to change it to a date format that looks like this "06/2003"

How do I do this





All times are GMT +1. The time now is 11:12 PM.

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