【问题标题】:Crystal report find the last month end date水晶报表查找上个月结束日期
【发布时间】:2013-07-10 10:07:22
【问题描述】:

在水晶报表中,如果我给出任何日期,我想找到上个月的结束日期

我搜索并得到了这个:Crystal Report Date formula to make it the end of the month,但没有更具体的查询

例如:

Suppose if I give date as : 21/06/2013  
formula: formula{?date}  
expected output : 31/05/2013

【问题讨论】:

    标签: crystal-reports


    【解决方案1】:

    创建公式并使用以下代码

    CDATE(DATEADD("d", -1, DATE(YEAR({?Parameter}), MONTH({?Parameter}), 1)))
    

    参数必须是日期类型。

    【讨论】:

      【解决方案2】:

      试试下面的公式:

      DateAdd ("d", -DatePart ("d", {?Parameter}), {?Parameter})
      

      【讨论】:

        猜你喜欢
        • 2019-12-10
        • 2013-01-25
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-02-11
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多