COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: Taboka on 29 Nov 2007 01:25:02 AM

Title: Date formatting
Post by: Taboka on 29 Nov 2007 01:25:02 AM
Hi all,
My question is as follows:I have a list report with columns Date,Product Name and Count.The date is in format 28 Nov, 2007, 12:01:40 AM,28 Nov, 2007, 12:01:56 AM,etc.Now because there is a time difference on the same date,Product Names are repeating on the same date as well.I want a Product name to appear once per day.I have tried to format the date using the to_date and to_char functions,but to no avail.Could somebody perhaps point me in the right direction,

Thanks\Regards

Taboka
Title: Re: Date formatting
Post by: rockytopmark on 29 Nov 2007 09:06:21 AM
Use EXTRACT() function to retrieve parts of the timestamp, and piece those parts into a Date only query item.
Title: Re: Date formatting
Post by: lastsummer on 29 Nov 2007 08:29:18 PM
You can use function like this
Cast(YourTimestamp, DATE)
Title: Re: Date formatting
Post by: Taboka on 30 Nov 2007 05:27:24 AM
Thank you both for your assistance  ;D

Cheers

Taboka