ExcelBanter

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

Happy One

how to change number to date
 
How to change the number 1122008 to 1/12/2008?

Fred Smith[_4_]

how to change number to date
 
Probably the best is:

=date(mod(a1,10000),mod(int(a1/10000),2),day(int(a1/1000000)))

This will handle the case where you have two digit dates.

Regards
Fred

"Happy One" <Happy wrote in message
...
How to change the number 1122008 to 1/12/2008?



David Biddulph[_2_]

how to change number to date
 
=DATE(RIGHT(A2,4),MID(A2,LEN(A2)-5,2),LEFT(A2,LEN(A2)-6))
--
David Biddulph

"Happy One" <Happy wrote in message
...
How to change the number 1122008 to 1/12/2008?




Dave Peterson

how to change number to date
 
This worked for me with my USA date settings (mdy):
=--TEXT(A1,"00\/00\/0000")
and formatted as a date



Happy One wrote:

How to change the number 1122008 to 1/12/2008?


--

Dave Peterson

Happy One

how to change number to date
 
Yes, it works.

Thank you,

"Dave Peterson" wrote:

This worked for me with my USA date settings (mdy):
=--TEXT(A1,"00\/00\/0000")
and formatted as a date



Happy One wrote:

How to change the number 1122008 to 1/12/2008?


--

Dave Peterson



All times are GMT +1. The time now is 07:44 AM.

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