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")
Share:
56,670
Nathan Koop
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, 2022

Comments

  • Nathan Koop
    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
    Nathan Koop almost 15 years
    Is 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
    Arushi Rajput almost 15 years
    I 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
    Nathan Koop over 13 years
    won't this display "19/06/2009" instead of the requested "Friday, June 19, 2009"? (no CR on current computer to test atm)
  • xr280xr
    xr280xr almost 4 years
    What 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.