Crystal Reports DateTime Formatting

£可爱£侵袭症+ 提交于 2019-12-29 08:50:52

问题


I'd like to format a datetime in Crystal Reports to a include the day of week.

From:

19/06/2009

To:

Friday, June 19, 2009


回答1:


In Crystal Reports XI Release 2 you can right click on the field and go to Format Field. On the "Date and Time" tab click the customize button. Under the Date Tab change the Date Type drop down to "Windows Default Long".




回答2:


If in a formula, you can use the following.

CSTR({?@end_dt}, "dddd, MMMM d, yyyy")



回答3:


If the DateTime is in field (not a formula) :

Right click on the field -> Format Editor
Date and Time tab
Select date/time formatting you desire (or click customize)

If the datetime is in a formula:

ToText({MyDate}, "dd-MMM-yyyy")



回答4:


You can use this formula:

CSTR(Date({command.EntryDate}), "dd/MM/yyyy")


来源:https://stackoverflow.com/questions/980877/crystal-reports-datetime-formatting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!