Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 77
Default Convert number to date

I am importing data from an AS400 program and my dates are formated as 10107
for January 1, and would be 110107 for November 1. Can anyone help me figure
out out to convert to 1/01/07 and 11/01/07?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Convert number to date

datatext to columns, click next twice in step 3 under column data format
select date and make sure it is MDY, then click finish


--
Regards,

Peo Sjoblom



"Teri" wrote in message
...
I am importing data from an AS400 program and my dates are formated as
10107
for January 1, and would be 110107 for November 1. Can anyone help me
figure
out out to convert to 1/01/07 and 11/01/07?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Convert number to date

Certainly there must be another way, but here's one way. Format your cells
as Date and the desired format.

=(LEFT(LEFT(A1,LEN(A1)-2),LEN(LEFT(A1,LEN(A1)-2))-2)&"/"&RIGHT(LEFT(A1,LEN(A1)-2),2)&"/"&RIGHT(A1,2))+0


"Teri" wrote in message
...
I am importing data from an AS400 program and my dates are formated as
10107
for January 1, and would be 110107 for November 1. Can anyone help me
figure
out out to convert to 1/01/07 and 11/01/07?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Convert number to date

If you need a genuine date then:

=DATE(RIGHT(A1,2)+2000,INT(A1/10000),RIGHT(INT(A1/100),2))

--
Gary''s Student - gsnu200723
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 281
Default Convert number to date

Hi,

right click on the cell you want to format choos format cells and then choos
number tab and then choos custom and then enter in the type textbox mmddyy
but it formats Jan 1, 2007 to 010107 not 10107.

Thanks,
--
Farhad Hodjat


"Teri" wrote:

I am importing data from an AS400 program and my dates are formated as 10107
for January 1, and would be 110107 for November 1. Can anyone help me figure
out out to convert to 1/01/07 and 11/01/07?



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Convert number to date

Did you try that? It will not work

--
Regards,

Peo Sjoblom


"Farhad" wrote in message
...
Hi,

right click on the cell you want to format choos format cells and then
choos
number tab and then choos custom and then enter in the type textbox mmddyy
but it formats Jan 1, 2007 to 010107 not 10107.

Thanks,
--
Farhad Hodjat


"Teri" wrote:

I am importing data from an AS400 program and my dates are formated as
10107
for January 1, and would be 110107 for November 1. Can anyone help me
figure
out out to convert to 1/01/07 and 11/01/07?



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 281
Default Convert number to date

Hi again,

it was a missunderestood try this:

A B
1 10107 =IF(LEN(A1)=5,"0"&A1,LEFT(A1,6))
2 110107

enter above formula in the cell B1 ( in this example ) and the copy drag the
formula to where you need and then copy past special value the formula that
you copied and then go to menudatatext to column and then choos Delimited
and next and coos other and enter / in the text box and next and choos MDY
from drupdown menu and Finish.

Thanks,
--
Farhad Hodjat


"Teri" wrote:

I am importing data from an AS400 program and my dates are formated as 10107
for January 1, and would be 110107 for November 1. Can anyone help me figure
out out to convert to 1/01/07 and 11/01/07?

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 77
Default Convert number to date

Awesome!! Perfect! Thank you for your help :)

"PCLIVE" wrote:

Certainly there must be another way, but here's one way. Format your cells
as Date and the desired format.

=(LEFT(LEFT(A1,LEN(A1)-2),LEN(LEFT(A1,LEN(A1)-2))-2)&"/"&RIGHT(LEFT(A1,LEN(A1)-2),2)&"/"&RIGHT(A1,2))+0


"Teri" wrote in message
...
I am importing data from an AS400 program and my dates are formated as
10107
for January 1, and would be 110107 for November 1. Can anyone help me
figure
out out to convert to 1/01/07 and 11/01/07?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do you convert a number into a date JCM Excel Worksheet Functions 2 April 6th 07 02:26 AM
Convert number to date Box666 Excel Discussion (Misc queries) 2 October 17th 06 04:28 PM
Convert Date to number? JethroUK© Excel Worksheet Functions 6 May 8th 06 10:15 PM
How can I convert a date into a week number... msbutton27 Excel Worksheet Functions 7 May 25th 05 09:44 PM
How do I convert Date serial number to date rdunne Excel Worksheet Functions 1 April 12th 05 03:04 PM


All times are GMT +1. The time now is 09:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"