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

gdspeareAsked:
Who is Participating?
 
mlmccConnect With a Mentor Commented:
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
 
gdspeareAuthor Commented:
I'm getting the error that a number is required on the monthname function?

Ideas?
0
 
gdspeareAuthor Commented:
I got it with a slight change.

MonthName(Month({Rpt453;1.POST_DATE}),TRUE) & ' ' & TOTEXT(Year({Rpt453;1.POST_DATE}),0,'')
0
 
wykabryanCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.