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.
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.
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?