COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: ninjamayo on 08 Jun 2016 10:32:43 AM

Title: Date format not applied on crosstab report
Post by: ninjamayo on 08 Jun 2016 10:32:43 AM
I have a crosstab report with two columns of dates (attributes) and I have calculations of min, max on them. I have tried everything to set the correct format on those two columns but I cannot get a short date shown. I have changed the aggregation / rollup aggregation to all sorts of different settings, I have done the calculation manually by using min and max, and I have set the date format within the data section of my columns. For some bizarre reason the dates are always displayed like this example: 20160516 and never as 16/05/2016 as I want them to be.

Any idea of what is going wrong?
Title: Re: Date format not applied on crosstab report
Post by: MFGF on 08 Jun 2016 10:45:41 AM
Quote from: ninjamayo on 08 Jun 2016 10:32:43 AM
I have a crosstab report with two columns of dates (attributes) and I have calculations of min, max on them. I have tried everything to set the correct format on those two columns but I cannot get a short date shown. I have changed the aggregation / rollup aggregation to all sorts of different settings, I have done the calculation manually by using min and max, and I have set the date format within the data section of my columns. For some bizarre reason the dates are always displayed like this example: 20160516 and never as 16/05/2016 as I want them to be.

Any idea of what is going wrong?

Are you using a dimensional package or a relational package?

MF.
Title: Re: Date format not applied on crosstab report
Post by: bdbits on 08 Jun 2016 03:07:12 PM
Are they actually stored as dates in your data source? Could they actually be strings representing dates?
Title: Re: Date format not applied on crosstab report
Post by: dougp on 08 Jun 2016 05:34:31 PM
20160516 appears to be an 8-digit integer representation of a date, not actually a date.

If your data is actually a date data type (coming out of the Framework Manager model) the format will be whatever your default date format is.
Title: Re: Date format not applied on crosstab report
Post by: ninjamayo on 09 Jun 2016 05:14:00 AM
It seems that we were looking at the aggregations completely the wrong way. Problem solved now. Basically we needed to add the dates as rows to our crosstab.