month number to month name (WEBI)

hi i am designing a WEBI report … the given universe has month number but no month name i want to change the month number to month name in the universe but i dont know how… and i also have to sort the month with aprial as the first month and march being the last

and again the financial year is given as a string (C for current year and N for next year) i want to have eg 2012 for C and 2013 for N
help please


imbelani :south_africa: (BOB member since 2012-04-19)

You could use a series of IF([monthnumberfield]=1) THEN("January) ELSEIF([monthnumberfield]=2) THEN(“FEBRUARY”) etc… The syntax may be a little different, but you get the idea. Just end your last with ELSE(“DECEMBER”)


Ruune :us: (BOB member since 2007-08-13)

[Moderator note - moved to WebI forum]


Nick Daniels :uk: (BOB member since 2002-08-15)

To sort with April first, sort by financial year then month.

To get month number, create a date from month. If month number is a number, then create your date as:

=ToDate("2012-"+FormatNumber([Month Number];"00")+"-01";"yyyy-MM-dd")

But, you want month name, so evolve that to:

=FormatDate(ToDate("2012-"+FormatNumber([Month Number];"00")+"-01";"yyyy-MM-dd");"Mmmm")