COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: uyravikumar on 28 Jul 2006 03:32:34 AM

Title: extract function in reportnet
Post by: uyravikumar on 28 Jul 2006 03:32:34 AM
Hi All,

I am working on a project, i have problem with extract function.

I need to display the Hours:Minutes:Seconds of difference from two dates which is placed in on data item [TIMEDIFF].

I used
CAST(EXTRACT(HOUR,[TIMEDIFF]),VARCHAR(2))||':'||
CAST(EXTRACT(MINUTE,[TIMEDIFF]),VARCHAR(2))||':'||
CAST(EXTRACT(SECOND,[TIMEDIFF]),VARCHAR(2))


The output is 0:34:14. (OR) 0:33:23.3

I want to get the second part as Integer.

Can any body help me..

Thanks in advance
Title: Re: extract function in reportnet
Post by: MFGF on 28 Jul 2006 06:22:35 AM
Hmmm - deja vu.  Must be a glitch in the matrix!

Please see my previous reply to the same question.