convert AS400 date 1071101 to date 11/01/2007 mm/dd/yyy

D

Dirty70Bird

Hello, is there a way to convert the AS400 date 1071101 where 107 = 2007, 11
is month, 01 is the day? I'm attempting to use the Format function TDate:
Format([AS400DATE],"??????????") TIA!!!
 
D

Dirty70Bird

This appears to work..
Date: DateSerial(Left([SCEDAT],3)-100,Mid([SCEDAT],4,2),Right([SCEDAT],2))
 
D

Douglas J. Steele

Or

Date: DateSerial(Mid([SCEDAT],2, 1),Mid([SCEDAT],4,2),Right([SCEDAT],2))

Of course, you may run into problems if the year is greater than 2029.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Dirty70Bird said:
This appears to work..
Date: DateSerial(Left([SCEDAT],3)-100,Mid([SCEDAT],4,2),Right([SCEDAT],2))

Dirty70Bird said:
Hello, is there a way to convert the AS400 date 1071101 where 107 = 2007,
11
is month, 01 is the day? I'm attempting to use the Format function
TDate:
Format([AS400DATE],"??????????") TIA!!!
 
Top