If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Date Comparison In ReportNet

Started by Sheldon, 26 Feb 2010 12:16:10 PM

Previous topic - Next topic

Sheldon

I'm a newbie to Cognos 8.4/ReportNet and am writing my first Cognos report using Report Studio in an educational environment. In the following scenarion, I would like to only show records where [School year], a Date/Time field, is equal to the following:
[Program Participation].[Program Codes].[School Year]='Jun 30, 2006 12:00:00 AM'
I get an SQL error but I'm not sure how to make the comparison and only show records with the above date. Thanks for any help/suggestions.

Sheldon Potolsky

Nuffsaid

Hi,

You're trying to compare a date/time field to a string. You can't use single quotes around dates.

If you're not interested in the time portion try something like the following;

trunc([Program Participation].[Program Codes].[School Year]) = 2006-06-30



Nuffsaid.

Sheldon

Thanks.  Since I was mainly interested in the year, the following seemed to work:
to_char([Program Participation].[Program Participation].[School Year],'yyyy') = '2010'

Sheldon