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

currentmonth?

Started by pw, 12 Sep 2005 03:03:59 AM

Previous topic - Next topic

pw

Hi Folks,

i am just trying to get the current month in a query filter.
what i did was:

<dataelement> = TO_CHAR(current_date; 'YYYY') AND
<dataelement2> = TO_CHAR(current_date; 'MM')

But i get errors. can anybody help?

Thanks in advance,
regards
Philipp

Draoued

what does your dataelement contain ??

Is it a string or a number ??

have you tried the following
<dataelement> = to_number(TO_CHAR(current_date; 'YYYY'))

pw

The data element contains the year as string.

i don't know whether current_date is the right value for this filter action... but i could'nt find any other suitable value.

Draoued

What is your database ??

IF it s oracle , you can use the sysdate.

pw

yes it is an oracle 9.i something ;)

is it then:
[YEAR] = TO_CHAR(sysdate;'YYYY')

?

Draoued

[YEAR] =  to_char({sysdate},'YYYY')


hopefully you have enabled the Oracle function in your package.

Draoued

Is it functionning now ??