COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: kwierinc on 21 Nov 2007 11:12:54 AM

Title: Passing a Date Prompt paramater to a DataTime data type
Post by: kwierinc on 21 Nov 2007 11:12:54 AM
On my prompt page I have a date prompt that allows the user to select a specific date for which info needs to be shown. I'm experiencing difficulties when on my query of the master report I put a selection that compares a date-time data type (in the Oracle table) to the date value parameter. Changing the date prompt to a date time prompt overcomes this issue, but I do not want the users to see the clock picture.
Can this be solved using a specific function at Report Studio query level? Please help.
Title: Re: Passing a Date Prompt paramater to a DataTime data type
Post by: almeids on 21 Nov 2007 12:31:19 PM
I'm not sure if I understand your issue, but you may be able to resolve it either by using the "like" operator ( oracle_date like ?param?||'%' ) instead of "=", or by stripping the Oracle column down to date only ( trunc(oracle_date,'DDD') = ?param? ).
HTH
Steve
Title: Re: Passing a Date Prompt paramater to a DataTime data type
Post by: rockytopmark on 21 Nov 2007 12:58:00 PM
I have used this in the past...

to_date(to_char(yourDateTime,'YYYY-MM-DD'))