Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

cognos formatting

Posted on 2013-01-18
3
Medium Priority
?
420 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 Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Hello, In my precious Article  (http://www.experts-exchange.com/Database/Reporting/A_15280-Create-Project-in-Microstrategy-Part-I.html)we saw the Configuration part for Microstrategy which included Metadata Creation and DataSource Preparation as …
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

618 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