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

CAST function not working in Congos 10

Started by dust0000, 03 Nov 2016 07:44:57 AM

Previous topic - Next topic

dust0000

Hello Everybody,

I have a date code works well in Cognos 8.4 but cannot work on Cognos 10.

_add_months((Cast((extract(YEAR,{sysdate})||'-'||extract(Month,{sysdate})||'-16'),DATE)),-1)

Normally, I need find 16th for each month by current date. I cannot use current_date as well.

Do you have any suggestion?

Thank you very much!


MFGF

Quote from: dust0000 on 03 Nov 2016 07:44:57 AM
Hello Everybody,

I have a date code works well in Cognos 8.4 but cannot work on Cognos 10.

_add_months((Cast((extract(YEAR,{sysdate})||'-'||extract(Month,{sysdate})||'-16'),DATE)),-1)

Normally, I need find 16th for each month by current date. I cannot use current_date as well.

Do you have any suggestion?

Thank you very much!

Yes

Replace the whole expression with

_add_days (_first_of_month (current_date), 15)

MF.
Meep!