Solved

cognos formatting

Posted on 2013-01-18
3
402 Views
Last Modified: 2013-01-24
Hi,

I have an expression as below:

to_char(_first_of_month(_add_months(current_date,-6)))   and the output of it is  " 01-JUL-12"

but I need only "JULY". how to get this, please help.
0
Comment
Question by:new_perl_user
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 8

Assisted Solution

by:SNeupane
SNeupane earned 250 total points
ID: 38794236
All you have to do is add extract month in front of it.
For example:
extract(month from to_char(_first_of_month(_add_months(current_date,-6))) )
0
 
LVL 35

Accepted Solution

by:
Robert Schutt earned 250 total points
ID: 38794246
Have you tried
to_char(_first_of_month(_add_months(current_date,-6)), 'MONTH')

Open in new window

0
 
LVL 8

Expert Comment

by:SNeupane
ID: 38794248
Or use extract after the to_char like below.
It'll give you month in number:
to_char(extract(month from _first_of_month(_add_months(current_date,-6))))
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Showing subtotals 4 167
Telerik Reporting 2 144
VFP 9.0 -How do I use 2 reports to print as a 2 page report? 6 323
SSRS generating a table of contents 6 323
1. Set up your parameter at the report level as usual, check the box Multi-value, and set the Data Type to String 2. Set the Stored Procedure Parameter to varchar(max)  --<---- This part here is the key to it's success Example:    @cst_key var…
How to increase the row limit in Jasper Server.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question