Link to home
Start Free TrialLog in
Avatar of gdspeare
gdspeare

asked on

Format Forumula

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})
)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gdspeare
gdspeare

ASKER

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

Ideas?
I got it with a slight change.

MonthName(Month({Rpt453;1.POST_DATE}),TRUE) & ' ' & TOTEXT(Year({Rpt453;1.POST_DATE}),0,'')
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,'') )