jodatime - Usage of joda.time in icCube -
i use following mdx statement:
with member [x] now()->plusmonths(1)->withdayofmonth(1)->minusday(1) select [x] on 0 sales
but error "withdayofmonth" unknown. know function "plustmonths()" works fine. how can make other joda function work?
the following line active in iccube.xml. explicitely states add child packages if these required, not know if withdayofmonth child package , not know find that:
<allowedpackage>org.joda.time</allowedpackage>
unfortunately, now() creating internal date/time object not support yet joda methods (we'll add them in next release). in meantime, here several way compute end of month:
with // aware server's end of month not client, if don't see problem you've been lucky...for time being. // using mdx functions ( function can added schema ) function ic3_eom() datetime( now().year() , now().month() +1, 1 )->plusdays(-1) // using joda datetime ( function can added schema ) function ic3_eom_2() j!org.joda.time.datetime()->plusmonths(1)->withdayofmonth(1)->minusdays(1)->tolocaldate() member [ic3_eom] ic3_eom() member [ic3_eom_2] ic3_eom_2() select { [ic3_eom], [ic3_eom_2] } on 0 [sales]
Comments
Post a Comment