?
Solved

cognos formatting

Posted on 2013-01-18
3
Medium Priority
?
413 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 1000 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 1000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Problem Statement In an SAP BI BO Integration project when a BO universe is built on a BEx query, there can be an issue of unit & formatted value objects not getting generated in a BO universe for some key figures. This results in an issue whereb…
Hi, I am very much excited today since I'm going to share something very exciting Tool used for Analytical Reporting and that's nothing but MICROSTRATEGY. Actually there are lot of other tools available in the market for Reporting Such as Co…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

752 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