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

G

Guest

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!!!
 
G

Guest

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!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top