Extracting a MONTH and YEAR from a date
Hi,
I have extracted a month froma date using the expression
EXTRACT(MONTH FROM PERF_DATE)
However, for a cross tab I need a field that doesnt just display 1 or 2
(for Jan or Feb), but a field that dsiplays Jan-05 or Feb-05
How do I extract the month AND year, so that I can group by just that?
(I tried just changing the PERF_DATE display format too mmm-yy, but the
inherent data in the field causes the data to be grouped by exact date [dd-
mm-yy] on my crosstab.)
Thanks
Red
I have extracted a month froma date using the expression
EXTRACT(MONTH FROM PERF_DATE)
However, for a cross tab I need a field that doesnt just display 1 or 2
(for Jan or Feb), but a field that dsiplays Jan-05 or Feb-05
How do I extract the month AND year, so that I can group by just that?
(I tried just changing the PERF_DATE display format too mmm-yy, but the
inherent data in the field causes the data to be grouped by exact date [dd-
mm-yy] on my crosstab.)
Thanks
Red
This discussion has been closed.
Comments
Try creating two aggregate fields, one extracting the year and one
extracting the month. Then order your dataset based on year, then month.
This will get your dataset in a logical order to group on the month field.
Then you can use the crosstab formatting events to edit the output of the
original DateTime field. See the CrossTab demos for examples of this.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com