ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Data display (https://www.excelbanter.com/new-users-excel/21060-data-display.html)

Metalteck

Data display
 
I currently have a birthday field displayed as 19891011. I would like this to
be displayed as 10/11/1989. How do I do this?

Trevor Shuttleworth

The content of the cell is not a number representing a date. It cannot
therefore be formatted as a date. You could use LEFT, MID and RIGHT in
another cell to present the birthday as you want to see it

For example:

=MID(A1,5,2)&"/"&RIGHT(A1,2)&"/"&LEFT(A1,4)

or perhaps better:

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

and format as a date however you want to see it.

Change the cell reference to suit

Regards

Trevor


"Metalteck" wrote in message
...
I currently have a birthday field displayed as 19891011. I would like this
to
be displayed as 10/11/1989. How do I do this?




CLR

Assuming your date is in A1, put this in B1 or wherever........

=MID(A1,5,2)&"/"&RIGHT(A1,2)&"/"&LEFT(A1,4) will produce the display you
seek, but it will only be TEXT, not a actual date...........

=(MID(A1,5,2)&"/"&RIGHT(A1,2)&"/"&LEFT(A1,4))*1 will make it an actual Excel
Date/number which you can then format to look like what you want by doing
Right-click Format Cells Number tab Date and then select the format
of your choice.

Vaya con Dios,
Chuck, CABGx3


"Metalteck" wrote in message
...
I currently have a birthday field displayed as 19891011. I would like this

to
be displayed as 10/11/1989. How do I do this?





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

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