如何在 Crystal Report 中显示月份名称而不是月份编号(不是数据格式编号)?

最佳答案

当您提供 1 到 12 之间的数字(1 是一月)时,MonthName 函数可用于显示月份的名称。这对于在组标题中显示月份名称或在图表中标记组很有用。

它可以与 DatePart 函数结合使用以返回变量或计算的月份名称。

语法

 MonthName(month, abbr)

    Month   A number from 1 to 12.
    abbr    Optional.A Boolean value. If true, the month name is abbreviated. The default is false.

示例
Example                                 Result
MonthName(5)                            “May”
MonthName(10)                           “October”
MonthName(10,True)                      “Oct”
MonthName(DatePart(“m”, CurrentDate))   “October” when the current date is 10/5/10.

关于crystal-reports-2010 - 在 Crystal 报表中显示月份名称而不是月份编号,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/21525128/

10-15 15:07