Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
PRINTING PROBLEM OF MONTH NAME
arunkumarb
HI,
I HAVE SOME INTEGER VALUES LIKE 201108,201109,201110 ...NOW I WOULD LIKE TO PRINT THEIR MONTH NAMES LIKE AUGUST,SEPTEMBER, OCTOBER RESPECTIVELY. 201108---->AUGUST, 201109-->SEPTEMBER,201110-->OCTOBER.
REGARDS,
ARUN
Find more posts tagged with
Comments
rmurphy
You've posted in the Ad Hoc and Interactive Reporting forum, so is this something you have end users doing in a tool like Actuate's BIRT Studio (web-based ad hoc designer) or the Interactive Viewer?
If not, and this is simply in a BIRT Design, you need to create a computed column in your data set and create an expression to create a new Date object and pass in the Year and Month values parsed from your integer. Since you don't care about day, just always include 1 for the day of the month. Your computed colume expression would look something like:
sDate = row["IntYearMonth"].toString();
new Date(parseInt(BirtStr.left(sDate, 4)), parseInt(BirtStr.right(sDate, 2)) -1, 1);
Then just apply a date format to the data element in the report to just show the month or the month.