Home
Analytics
Converting Month to UpperCase
Mupagunaa
Hi,
Is there any way to convert the Month to Uppercase? I have used format="MMMM, yyyy"
and it displayed "May, 2001". I wanted the date to be displayed as "MAY, 2011" in the MASTER PAGE Header. How can I achieve that through BIRT-2.3.2?
Thanks,
Mupagunaa
Find more posts tagged with
Comments
rihanna
Try to convert the result to string and use upper case function of string.
Mupagunaa
Totally new to BIRT. Could you please elaborate how I can acheive this? I used the "Date" Autotext.
Thanks,
Mupagunaa.
rihanna
Try this:
importClass(java.text.SimpleDateFormat)
dateFormat = new SimpleDateFormat("MMMM, yyyy");
date = dateFormat.format(BirtDateTime.now());
date.toString().toUpperCase();
Mupagunaa
Hi rihanna,<br />
<br />
Do I have to cut paste the above code in the Autotext? or the Data element? or the Text element? Or else, do I have to write any script?? <a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/public/style_emoticons/'>http://www.birt-exchange.org/org/forum/public/style_emoticons/</a><#EMO_DIR#>/confused.gif
<a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/public/style_emoticons/'>http://www.birt-exchange.org/org/forum/public/style_emoticons/</a><#EMO_DIR#>/confused.gif
Kindly, let me know. <br />
<br />
Regards,<br />
Mupagunaa.
rihanna
Sorry Manzeer, forgot to mention that. Create a Dynamic Text using right click -> Insert -> Dynamic Text and copy paste the code inside it.
Mupagunaa
Hi rihanna,
That really solved my problem.. Learn't a new thing today.. Thank you so much and really appreciate your time.
Mupagunaa.
Mupagunaa
By the way, Do I have to include the semi-colon after the importClass statement??
rihanna
Yes, I think you should put a semicolon after import statement, but it doesn't give an error if you don't. Don't really know why.
You are welcome! I'm glad I could help you!