All:
CAVEAT: I'm not really an AS400 jockey, I just play one on TV.
Keeping that in mind......
I'm using a legacy AS400 application where all dates are stored as Integers, e.g. 05/01/2007 = 20070501. I figured out yesterday how to change the format from an INT to a DATE
(
date(SUBSTRING(CAST(OAENTD AS VARCHAR(8)),5,2)concat'/'concat
SUBSTRING(CAST(OAENTD AS VARCHAR(8)),7,2)concat'/'concat
SUBSTRING(CAST(OAENTD AS VARCHAR(8)),1,4)) AS EntryDate
)
What I'm trying to figure out now is what the actual format of the date field is so that I can perform operations (>=, <=, BETWEEN, etc. ) against it. Whenever I try to perform an operation now it returns the error "operands not compatible"
Many thanks in advance.
Oncorhynchus