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!

Formatting the Year in a Formula

Status
Not open for further replies.

tmozer

Programmer
Sep 11, 2004
66
US
@ReportTitle formula in CR 8.5:

"Commulative Cases/Assignments Received for " + MonthName(month(currentdate)) + " " + totext(int((year(currentdate))))

My year keeps printing as "2,004.00" no matter what I try.

How can I format to "2004"??
 
Sorry, I just copied and pasted your portion, It should be this:
totext(int(year(currentdate),0,""))

James
 
Sorry again, I'm typing faster than I'm thinking this morning

totext(year(currentdate),0,"")

returns what you want.

James
 
I use the following with my 8.5 reports

"Commulative Cases/Assignments Received for " + cstr(currentdate,"yyyy")
 
Here is my version:

"Commulative Cases/Assignments Received for " + totext(currentdate, "MMMM yyyy")

It takes care of your Month Name and year in the same function.


~Brian
 
Bottom line.... ToText and Cstr are equivalent functions so the choice is yours

Many of my monthly reports run after the close of the month to report the previous month's activity so I use the following

"Activity Summary for " & cstr(Maximum(LastFullMonth),"MMMM, yyyy")



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top