简体   繁体   中英

Scheduling COGNOS 11 report with last month filtered

We're trying to schedule a report in Cognos on the 18th of every month showing data from the 18th of the previous month to the 17th of the current month. How would I define this filter? We've previously used something like:

[date] between _add_days(current_date,-7 and _add_days(current_date,-1)

but haven't been able to work out a way to do that start date as months vary in length. Any suggestions would be greatly appriciated

Try

[date] between add_days(first_of_month(_add_months(current_date,-1)),18) and add_days(first_of_month(current_date),17)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM