View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Converting Text to Date using "Text to Columns"

On Tue, 27 Nov 2007 23:04:00 -0800, kahoko
wrote:

Hi all,

I have a few columns of date in excel which is imported from external data
source. It is shown as text in Excel. Some sample of the data are like
- 240708 (which is 24th July 2008)
- 10208 (which is 1 Feb 2008)

However, when I use the Text to Columns/Date(DMY) function to convert them
date, the following results is given
- 240708 -- 24/07/08 (correct)
- 10208 -- 2/10/08(INCORRECT)

I tried with Text to Columns/Date(MDY), then
- 240708 -- 240708 (nothing happen)
- 10208 -- 1/02/08(correct)

Is there any method in Excel I can use to convert this text to date? They
come in a mix of 5 and 6 digits.

Please help...

Thank you.



=DATE(MOD(A1,100)+1900+100*(MOD(A1,100)<31),MOD(IN T(A1/100),100),INT(A1/10000))


--ron