COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Jolavoie on 22 Aug 2016 12:58:17 PM

Title: Date format in Cognos 10
Post by: Jolavoie on 22 Aug 2016 12:58:17 PM
Hi,

I have a report with 10 pages and the date is in an incorrect format on 2 of them . On those pages the date is shown as
20 160 815. I want the date to look like 20160815. I tried changing the format of the columns on the pages but it doesn't do anything.

I already have a case on the date field:

****
case
when
[Account].[Account].[Date Update]=0
then
[Date account opening]
else
[Account].[Account].[Date Update]
end
****

Any ideas?

Thanks
Title: Re: Date format in Cognos 10
Post by: cognostechie on 22 Aug 2016 01:38:59 PM
What's the data type of the Date Update field in FM and the DB? How come you are comparing the value to a 0 ?
Title: Re: Date format in Cognos 10
Post by: Jolavoie on 22 Aug 2016 02:10:40 PM
The date format is 'default' (Standard). The other pages that are fine are set up the same way.

As for the case we want the report to show the changes done in the account on the date it was created or after. Therefore we ask that we get the info on the day it was created (if update date is 0) or the day it was updated (if that field is populated).

the case is on other queries and it works fine. It is also on the other pages of this query.

thanks

update
** I tried changing to ,Text' or 'Date', nothing works**
Title: Re: Date format in Cognos 10
Post by: cognostechie on 22 Aug 2016 04:36:25 PM
You will have to check the field type in the underlying table. Can't comment with this much information
Title: Re: Date format in Cognos 10
Post by: Jolavoie on 23 Aug 2016 08:01:53 AM
ok, I'll try to get more info about the table. Thanks a lot for your help
Title: Re: Date format in Cognos 10
Post by: prikala on 24 Aug 2016 12:10:40 AM
I bet your dates are actually stored as numbers (integers probably).
Try changing the format to numeric, specify 0 decimals and no thousands separator.