Crystal Reports DateTime Formatting
56,670
Solution 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".
Solution 2
If in a formula, you can use the following.
CSTR({?@end_dt}, "dddd, MMMM d, yyyy")
Solution 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")
Author by
Nathan Koop
I'm currently a Sr. Dev/tech lead at Bold Commerce. I work with PHP, Laravel, Eloquent, React, Redux, GoLang, MySQL and more.
Updated on July 09, 2022Comments
-
Nathan Koop almost 2 years
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
-
Nathan Koop almost 15 yearsIs there anyway to implement this formatting in a formula? IE: I have two database fields that I want to combine into one Crystal Reports field.
-
Arushi Rajput almost 15 yearsI put another answer on here for this question to help other people with this same issue since (if people are like me) they generally don't really read the comments. If you want to do that you can just concatenate two functions similar to the second answer together in a formula field.
-
Nathan Koop over 13 yearswon't this display "19/06/2009" instead of the requested "Friday, June 19, 2009"? (no CR on current computer to test atm)
-
xr280xr almost 4 yearsWhat if you still want to use the system format but in a formula. I'm trying to output a string for a minimum date, otherwise the date in the system date-only format. I don't want to hard code the order of month and day.