Solved

# Format Forumula

Posted on 2008-11-17
Medium Priority
224 Views
I am using the below formula in BO XI.  I am trying to retun the monh name followed by the 4 digit year.  However, my year is formatting like "2,008.00" instead of "2008"

Any ideas on how I can format this to display properly?

Thanks

``````TOTEXT(
IF MONTH({Rpt453;1.POST_DATE}) = 1 THEN 'JAN ' & YEAR({Rpt453;1.POST_DATE}) ELSE
IF MONTH({Rpt453;1.POST_DATE}) = 2 THEN 'FEB ' & YEAR({Rpt453;1.POST_DATE}) ELSE
IF MONTH({Rpt453;1.POST_DATE}) = 3 THEN 'MAR ' & YEAR({Rpt453;1.POST_DATE}) ELSE
IF MONTH({Rpt453;1.POST_DATE}) = 4 THEN 'APR ' & YEAR({Rpt453;1.POST_DATE}) ELSE
IF MONTH({Rpt453;1.POST_DATE}) = 5 THEN 'MAY ' & YEAR({Rpt453;1.POST_DATE}) ELSE
IF MONTH({Rpt453;1.POST_DATE}) = 6 THEN 'JUN ' & YEAR({Rpt453;1.POST_DATE}) ELSE
IF MONTH({Rpt453;1.POST_DATE}) = 7 THEN 'JUL ' & YEAR({Rpt453;1.POST_DATE}) ELSE
IF MONTH({Rpt453;1.POST_DATE}) = 8 THEN 'AUG ' & YEAR({Rpt453;1.POST_DATE}) ELSE
IF MONTH({Rpt453;1.POST_DATE}) = 9 THEN 'SEP ' & YEAR({Rpt453;1.POST_DATE}) ELSE
IF MONTH({Rpt453;1.POST_DATE}) = 10 THEN 'OCT ' & YEAR({Rpt453;1.POST_DATE}) ELSE
IF MONTH({Rpt453;1.POST_DATE}) = 11 THEN 'NOV ' & YEAR({Rpt453;1.POST_DATE}) ELSE
IF MONTH({Rpt453;1.POST_DATE}) = 12 THEN 'DEC ' & YEAR({Rpt453;1.POST_DATE})
)
``````
0
Question by:gdspeare
• 2

LVL 101

Accepted Solution

mlmcc earned 1000 total points
ID: 22976916
Use this

ToText(YEAR({Rpt453;1.POST_DATE},0,'')

An easier way

MonthName ({Rpt453;1.POST_DATE},True)  & ' ' & ToText(YEAR({Rpt453;1.POST_DATE},0,'')

If you need it in uppercase the
UCase(MonthName ({Rpt453;1.POST_DATE},True)  & ' ' & ToText(YEAR({Rpt453;1.POST_DATE},0,'') )

mlmcc
0

Author Comment

ID: 22977093
I'm getting the error that a number is required on the monthname function?

Ideas?
0

Author Comment

ID: 22977228
I got it with a slight change.

MonthName(Month({Rpt453;1.POST_DATE}),TRUE) & ' ' & TOTEXT(Year({Rpt453;1.POST_DATE}),0,'')
0

LVL 16

Expert Comment

ID: 22977231
MonthName (Month({Rpt453;1.POST_DATE}),True)  & ' ' & ToText(YEAR({Rpt453;1.POST_DATE},0,'')

or

UCase(MonthName (Month({Rpt453;1.POST_DATE}),True)  & ' ' & ToText(YEAR({Rpt453;1.POST_DATE},0,'') )
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
###### Suggested Courses
Course of the Month15 days, 21 hours left to enroll