-1

我们试图在每个月的 18 日在 Cognos 中安排一份报告,显示从上个月 18 日到本月 17 日的数据。我将如何定义这个过滤器?我们以前使用过类似的东西:

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

但是由于月份的长度不同,因此无法找到开始日期的方法。任何建议将不胜感激

4

1 回答 1

1

尝试

[date] between add_days(first_of_month(_add_months(current_date,-1)),18) and add_days(first_of_month(current_date),17)
于 2020-07-21T17:02:53.907 回答