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

11.0.8 Date functions broken?

Started by Jeff H., 17 Nov 2017 12:55:34 PM

Previous topic - Next topic

Jeff H.

Hi all,

Has anyone had issues with the Cognos Report date functions? It looks like they've changed the behaviour of these and I can't get any of them to work.

date2string, string2date, current_date has been renamed to AsOfDate(). I wish they'd document this stuff. I guess that's too much to ask.

I noticed too that the cast function is gone from this release.


Thanks,
Jeff

rockytopmark

current_date is still there, and as always, is only available in data item (query) expressions. 
AsOfDate() is available in report expressions only.

date2string() is only a report expression function and is working fine in 11.0.8.

string2date() is only a report expression function and is working fine in 11.0.8.

MK

Jeff H.

#2
Thanks! I haven't been doing much FM modelling/report writing lately and forgot which functions work in query subjects vs. report.

We ran into a problem in a report existing report where the report expression was:

_last_of_month(string2timestamp(ParamValue('pDateRange')))

we had to modify it to:

_last_of_month(date2timestamp(string2date(ParamValue('pDateRange'))))


From what we are seeing the string2timestamp is now not accepting the ParamValue because it's actually a date. It appears the function is now strongly typed so it must be a string for the string2timestamp to work. It would be nice if _last_of_month didn't expect a timestamp and could use a date instead.