COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: pooja on 13 Jan 2010 07:38:15 PM

Title: getting n of days in decimal form
Post by: pooja on 13 Jan 2010 07:38:15 PM
we need to calculate average no of days(in decimal form) between two dates, say ..min date & max date.AND we have db2 as back-end.
please share some advise how to do it

thank you v much in advance
Title: Re: getting n of days in decimal form
Post by: blom0344 on 14 Jan 2010 04:41:15 AM
Cognos has a standard function called:  _days_between to calculate the diff between 2 dates.
Using Cognos functions allows you to stay within Cognos SQL.
For native DB2 functions I would suggest Graeme Birchall's cookbooks as reference:

http://mysite.verizon.net/graeme_birchall/id1.html

Should no be necessary ib this case..
Title: Re: getting n of days in decimal form
Post by: pooja on 14 Jan 2010 09:16:57 AM

....Should no be necessary ib this case..



??????
Title: Re: getting n of days in decimal form
Post by: blom0344 on 14 Jan 2010 10:13:49 AM
Quote from: pooja on 14 Jan 2010 09:16:57 AM
....Should no be necessary ib this case..



??????

" Only use native DB functions when no Cognos equivalent is available"