Crystal 报告中的日期时间

Datetime in Crystal report

如何在 Crystal 报告中只设置日期?另外,如何从 ID 列中的数字中删除逗号?

我像这样为 fromdatetodate 创建了一个公式。如何仅在 fromdatetodate 中设置日期并从 ID 列中的数字中删除逗号?

以下是我从数据库中获取 ID 列的方法:

在您的日期公式中使用:

date({table.field})

要删除逗号,请参阅:

How to remove comma from crystal report string and from integer field

试试这个:

要转换日期,请使用

CDate(datetime field);

删除,使用

    ToText(ID,'#') //If this one throws error or 
ToText(ID,0,"")

删除','

写入点击 Id 和 Select 格式化对象 select您要使用的合适选项。 请确保 ID 不是字符串或非数字数据类型。