Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing a number with text 1

Status
Not open for further replies.

greenman

MIS
Jan 10, 2001
8
US
I am relatively new to SCR. I have part of my SQL query performing a datepart to convert the date to a number representing the month (1 - 12). In my report, I need the number to display as the full text of the month (eg- 1 = January). Thanks for any help!
 
If you have CR 8 there is the MonthName () function so that you can go:

MonthName ({number.field})

and get the name of the month.

Otherwise it is:

If {number.field} = 1 then "January" else
If {number.field} = 2 then "February" else
....
else December



Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Thanks! Worked perfectly. Apologies for neglecting to mention my version number (CR8).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top