Date Conversions on AS400 iSeries Navigator SQL tool

agbeer

Member
Hi there,

I am using the following SQL statement to convert dates from Julian in AS400 iSeries Navigator SQL tool.

select date(char(sddrqj+1900000))
from f4211

This returns the date in a yyyy-mm-dd format, can anyone advise how to convert this to dd-mm-yyyy?

Thanks in advance.

Andy.
 
Try this:

SELECT
REPLACE(CHAR(DATE(DIGITS(DECIMAL(SDDRQJ + 1900000, 7, 0))), EUR), '.', '-')
FROM F4211

Not sure that REPLACE is implemented in early versions of OS/400. We're on V5R4.

Regards,
 
Back
Top