Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is there any specific date format required while extracting data from DB2 database?
Because, I have extracted data from the DB2 database.In that data, date values are showing in numbers.
If we are using, mid,left or right function then i am not able to get proper date format for all values.
Is there any specific date format for DB2 db.
Thanks in advance,
Regards,
Durai
Here is another solution in converting a db2 date as part of the data load.
SUBSTR(DIGITS(DATEFIELD), 5, 2)||'/' || SUBSTR(DIGITS(DATEFIELD), 7, 2)||'/'||SUBSTR(DIGITS(DATEFIELD), 1, 4) AS dateName
Try this
=Date(AddYears(Date(Date#('19'&Right(DateField,6),'YYYYMMDD'),'DD/MM/YYYY')
,100*Left(DateField,1)),'DD/MM/YYYY')