COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: bujji on 17 Feb 2009 09:23:46 AM

Title: how to eliminate time part from the date time data type Query ITEM (Sql server)
Post by: bujji on 17 Feb 2009 09:23:46 AM
Hello All,

i am using Cognos 8.3, my DB is sql server 2005

in my balance query subject i have the below QueryItem (Balance Date)

dateadd({dd},0, datediff({dd},0, [DATABASE Query Subjects].[Balance].[Bal_Date] ))

here what i am trying is eliminating time part from the date (since Sql server has Date/Time format only)
but there is no use with above statement (it is still showing time after date as below)

Bal_Date
Dec 31, 2003 12:00:00 AM
Dec 31, 2003 12:00:00 AM
Dec 31, 2003 12:00:00 AM
Dec 31, 2003 12:00:00 AM
Dec 31, 2003 12:00:00 AM
Dec 31, 2003 12:00:00 AM
Dec 31, 2003 12:00:00 AM
Dec 31, 2003 12:00:00 AM


how can i eliminate time part from  above date column, so that when ever user use this field in their report, only date part will displays

Best Regards
bujji
Title: Re: how to eliminate time part from the date time data type Query ITEM (Sql server)
Post by: bujji on 17 Feb 2009 10:41:55 AM
Hello All,

i achieved it, by changing the data format for query item from default to Date (Date Style ---> to either medium or full)

it may help ful to some one like me

Best Regards
bujji
Title: Re: how to eliminate time part from the date time data type Query ITEM (Sql server)
Post by: crn.siva on 20 Feb 2009 07:15:32 AM
hi,

in date field select date property in that date style set as 'short'

ok try this way