-
Formatting a date
Hi,
One of the fields in the report I'm trying to create is date field which as a date in the format mm/dd/yyyy (e.g. 12/25/2007). Is there any way that I can display the date as, for example, December 25, 2007 instead of 12/25/2007.
Also, I need this to be done for axis labels on a chart.
Thanks in advance!:)
-
Re: Formatting a date
-
Re: Formatting a date
The following characters are used to create format strings for Date, Time, and DateTime values:
ToText({Table1.Date1},"dd-MMMM-yy")
Character Comments
d day of month without leading zero for single digits
dd day of month with leading zero for single digits.
ddd day of week as a three letter abbreviation
dddd full name of day of week
M month without leading zero for single digit
MM month with leading zero for single digit
MMM month as three letter abbreviation.
MMMM full name of month
yy l ast two digits of year
yyyy full four digits of year
JG
-
Re: Formatting a date
Thanks for the help, but another issue that comes up here is that when I use the ToText function, I can no longer 'order' the dates in a graph/chart. For example, whereas with the normal date field I could order the data by every 10mins, 1hour, day, etc, crystal reports doesn't seem to recognize the 'ToText version' of the date as being an actual date. As such, for instance, I cannot set my bar graph to consider the date in 1-minute intervals.