View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Colo Colo is offline
external usenet poster
 
Posts: 62
Default AS400 Date value conversion to Excel

Hi D.S.,
I think Dave's way is best.
Assume AS400 formated data is located in Column A, the code below works on
my pc as inteded.

Sub Test()
With Columns(1)
.NumberFormatLocal = "@"
.TextToColumns Destination:=Range("A1"), _
DataType:=2, FieldInfo:=Array(Array(0, 1), Array(1,
5))
' .Clear
End With
End Sub


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


"D.S." wrote in message
...
I have an excel query that return dates from an AS400 system, and the date
'as is', is almost useless for my presentation. For instance, today's

date
12/3/03, would be returned as 1031203.

Any suggestion to convert this to the MMDDYY format above? It would be
great if I could add some type of conditional statement to the SQL code in
the query, but could also use an Excel worksheet formula in the adjacent
column to convert the value.

D.S.