I need the date in a simple dd-mon-yy format.
Did you use the proper format model in your query?
For example,
If the date value in the database is 20150225
, then you need to first convert it to date using TO_DATE and respective FORMAT MODEL.
to_date('20150225','YYYYMMDD')
In order to display the date in your desired format, just use TO_CHAR and desired format model:
to_char(to_date('20150225','YYYYMMDD'),'DD-MON-YYYY')
Have a look at this article.
Update Regarding alphabetical sorting on month in chart
Found the following information on web:
If you are designing chart using RTF template, please try this:
- Right click chart image - click size - click AltText tab
- Copy the chart code into a notepad
- Look for the tag ColLabelsIt will be something like this:
ColLabelsxsl:for-each select=".//G_1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xsl:sort
order="ascending" select="FIRST_NAME"/Labelxsl:value-of
select="FIRST_NAME" //Label/xsl:for-each/ColLabels
Please see the sorting order that has been highlighted. In sorting order, you can add the field/column that is holding the month/year combination. If your chart is using group function then xsl:sort order="ascending" select="current-group()/FIRST_NAME"/