If you are unable to create a new account, please email support@bspsoftware.com

 

How can I convert integer to date with ddmmyy in iSeries DB2 in cognos framework

Started by clingst, 01 Aug 2015 04:43:04 AM

Previous topic - Next topic

clingst

i have no luck on research and got the solution on this... attempting to convert/cast given integer (eg: 301193) to date with format 1993-11-30. I need the date data type to build my cube.. and i should use 'Database only' or 'limited local' for query processing mode...

bdbits

This is untested, but the expression would be something like this. Check the user guide, function tab in the expression editor for more information.

cast(substring(cast(myinteger,varchar(6)),3,2)+'-'+substring(cast(myinteger,varchar(6)),1,2)+'-'+substring(cast(myinteger,varchar(6)),5,2),date)