COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: bujji on 13 Feb 2009 02:37:34 PM

Title: How to remove Time part in FM MODEL from date/time QueryItem .. please
Post by: bujji on 13 Feb 2009 02:37:34 PM

Hello All,

i am using sql server 2005, here in accounts table,  i am having opendate column which is having DateTime as datatype now when i testing in FM Model (QuerySubject Definition--> Test Tab) it shows Data with Time ,

in order to remove time part from the column in FM model, i did as below, but still it shows Data & Time


dateadd({dd},0, datediff({dd},0, [DataBaseSubjects].[Accounts].[OpenDate] ))



could any one help me please..
how can i make it to show only date no time at all

Thanks & Regards
asin
Title: Re: How to remove Time part in FM MODEL from date/time QueryItem .. please
Post by: John_Russell on 13 Feb 2009 04:02:31 PM
Howdy!

You could always make this change in the FWM, by applying the pattern "MM/dd/yyyy" to the Datetime field.  This will do the trick!

I have attached a screenshot for further reference.

John


Title: Re: How to remove Time part in FM MODEL from date/time QueryItem .. please
Post by: TEVAMANA on 27 Feb 2009 01:13:18 PM
Hi,

To remove time from your datetime you can use this SQL Server 2005 function: CAST(DATETIME AS DATE)

Regards