COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: siyad on 21 Jan 2013 07:17:34 AM

Title: converting Number date from TM1 cube to dd mm yyyy format
Post by: siyad on 21 Jan 2013 07:17:34 AM
Hi gurus,

I am using report studio 10.1 here

I have a date column from a TM1 cube and I am in need to access the member instead of an attribute for a date field and report studio displays the number for the date field from TM1 cube. The number is the number of days from 01-01-1900, eg:- 41306 for Jan 17 2013

anybody know the way i can convert this number easily to a date format

Thanks in advance

Siyad
Title: Re: converting Number date from TM1 cube to dd mm yyyy format
Post by: CognosPaul on 21 Jan 2013 09:47:54 AM
Is this a crosstab or a list? If it's a list, add the date to the properties, unlock the report and drag in a layout expression to the cell. If it's crosstab, set the text source value to report expression.

The expression should be:

_add_days ( string2timestamp('1900-01-01 00:00:00.000'), [Query].[Data Item] )

Cognos is returning that as Feb 3, 2013 though, so add or subtract from data item as necessary.
Title: Re: converting Number date from TM1 cube to dd mm yyyy format
Post by: siyad on 21 Jan 2013 12:27:24 PM
Thanks Paul...this has worked ...great one