Problem(Abstract)

Resolving the problem

To display it as a string ('August', for example) there are several solutions:

1) Before extracting, change the date format of the date data item to date and date style to Long. Now select 'no' to display years,weekdays and days. Select yes to display months. This when run gives the date displayed as month name.

2) Use a Case Statement

case extract(month,[Order date]) when 1 then 'January' when 2 then 'February' when 3 then 'March' when 4 then 'April' when 5 then 'May' when 6 then 'June' when 7 then 'July' when 8 then 'August' when 9 then 'September' when 10 then 'October' when 11 then 'November' when 12 then 'December' else 'error' end

3) Use one of the vendor specific functions depending on the database.

See the attached reportspec using Gosales and Retailers .

Related information

KB 1019996: How do I extract the year and/or month from a date field using Cognos 8?