ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   number to date format (https://www.excelbanter.com/excel-discussion-misc-queries/193420-number-date-format.html)

womit

number to date format
 
how do convert a cell with 8 numbers 19680422 into the date format 4/22/1968 ?

Kevin B

number to date format
 
Replace cell A1 in the expample with the corresponding cell in your worksheet:

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


"womit" wrote:

how do convert a cell with 8 numbers 19680422 into the date format 4/22/1968 ?


Pete_UK

number to date format
 
Assuming they start in cell A1, put this in B1:

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

Format the cell how you want it to appear, then copy down to B8.

Hope this helps.

Pete

On Jul 2, 2:57*pm, womit wrote:
how do convert a cell with 8 numbers 19680422 into the date format 4/22/1968 ?



Dave Peterson

number to date format
 
Another one:
=--(TEXT(A1,"0000\/00\/00"))
and format it as a date.

If you have a single column of these things, you can:
select the range
data|text to columns (xl2003 menus)
fixed width (no separators!)
and choose ymd as the date format

And then format it the way you like.

womit wrote:

how do convert a cell with 8 numbers 19680422 into the date format 4/22/1968 ?


--

Dave Peterson


All times are GMT +1. The time now is 12:36 AM.

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