Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
display list of dates between two dates
purushdk
Hi
I am using birt2.3 to develop reports.
i am using cascading parameter where i am getting three level parameter.
from third level parameter i will get from date and to date.
using from date and end date parameter there is way to get list of dates between start to end date, all the list of dates i need to display as a combo box parameter.
Thanks
k.purushothaman
Find more posts tagged with
Comments
johnw
Use an external parameter dialog.
sober
<blockquote class='ipsBlockquote' data-author="'johnw'" data-cid="50947" data-time="1247861631" data-date="17 July 2009 - 01:13 PM"><p>
Use an external parameter dialog.<br /></p></blockquote>
<br />
Could you be more specific about this? What do you mean by external parameter dialog?<br />
<br />
I have a similar problem - two parameters (start and end date) - and would need to generate a list of all dates in between.<br />
<br />
How would one get a list of all dates between a start and end date?
Hans_vd
If you are lucky enough to be on an Oracle 11g database, you could create a dataset with this query:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
WITH params AS (
SELECT ? AS from_date,
? AS to_date
FROM dual
),
dates (from_date, num) AS (
SELECT CAST (from_date AS DATE),
CAST (to_date - from_date AS NUMBER)
FROM params
UNION ALL
SELECT CAST (from_date AS DATE),
CAST (num - 1 AS NUMBER)
FROM dates
WHERE num - 1 >= 0
)
SELECT from_date + num
FROM dates
ORDER BY num</pre>
<br />
But maybe you aren't :-)<br />
On the other hand I'm sure there are more databases that support hierarchical queries.<br />
<br />
Regards<br />
Hans