COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: alexanderferreira on 28 Jul 2009 01:05:39 PM

Title: Trunc Date Format
Post by: alexanderferreira on 28 Jul 2009 01:05:39 PM
HI,

I have a field with the date format "2007-04-01 00:00:00.000". I would turn to the following format "2007-04-01", because I am not getting.
With Cognos Impromptu had the option of datetime-to-date that it was a "trunc".
How to do it in Frameworkmanager?

Tks!!
Title: Re: Trunc Date Format
Post by: Matt toth on 28 Jul 2009 01:11:45 PM
What is the backend database?

If you have sql server - you can use convert(varchar(10), date,101) to convert the data to a string.

Matt
Title: Re: Trunc Date Format
Post by: alexanderferreira on 28 Jul 2009 01:18:21 PM
Hi Matt,

I am using Oracle..
Title: Re: Trunc Date Format
Post by: bl on 12 Aug 2009 10:45:48 AM
trunc([fieldname]) is one way in Oracle to strip out the time component from a date/time field.