If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Month in bar chart

Started by yannunderw, 14 May 2025 03:53:36 AM

Previous topic - Next topic

yannunderw

Hello,
I'm using Cognos Analytic 12.0.3. In a bar chart, I want to display the month (in abbreviated letter format, like Jan., Feb., etc.) on the x-axis. My date field is in the format 2021-04-08T01:56:28. Do you have any suggestions, please?
Thank you.

bus_pass_man

extract ( datepart , datetime_expression ) or _month ( date_expression ) will get you the month number value, which you could then use in a case statement to get the strings you want. 

The question I have is: Why hasn't your modeler done that for you? For that matter, it would seem to me that these sorts of things (month and day names and abbreviated month names ) should be created during ETL, before the modeler has to.

dougp

QuoteMy date field is in the format 2021-04-08T01:56:28.

Do you mean your varchar column contains values that look like dates?  Or are you working with a datetime data type (which doesn't have a format)?  If it's a datetime, can't you just use the numeric format options for the axis labels?