Instead, if you want to do this in a Report Definition, then in the calculation builder, you can reference the function alias Embed-UserFunction.pxDifferenceInMonths. (See screenshot attached) Choose the appropriate one for your database since there are several circumstanced ones.
Posted: 1 year ago
Posted: 20 Dec 2019 15:18 EST
Ron Lee (RonLee_GCS)
Principal Software Solutions Engineer
If I understand what you need, you don't want the difference in months between 2 dates, you want a list of the months that fall between 2 dates. I don't believe we have an OOTB function alias (i.e., Embed-UserFunction) that will provide that, and I'm not sure that something in the form of a function alias would be the most useful to you.
At any rate, I suspect that you will need to write your own function alias or possibly a report (to use as a sub-report) to return the list of months or month/year pairs (since you didn't specify whether the start and end dates could be more than a year apart). It will probably involve doing a "SELECT DISTINCT …" and using the SQL built in MONTH(date) and YEAR(date) functions.