← Back to team overview

dhis2-devs team mailing list archive

Re: Relative periods

 

We are going make an iReport from a query.

It uses data elements from the last 3 months relative to the month in
question, but we've just figured it out.
We used the period format and cast it into date in postgres. Just
substracted 3 months from this.

Thank you.


2014-04-01 10:31 GMT+02:00 Lars Helge Øverland <larshelge@xxxxxxxxx>:

> Hi Kenneth,
>
> no this is implemented in the application (java) layer. May I ask why you
> need this? Did you check out the analytics web api?
>
> http://www.dhis2.org/doc/snapshot/en/user/html/ch28s17.html
>
> If so, is there any features you miss?
>
> regards,
>
> Lars
>
>
>
> On Tue, Apr 1, 2014 at 10:27 AM, Kenneth Børtveit <
> kenneth.bortveit@xxxxxxxxx> wrote:
>
>> Hi Devs!
>>
>> Is it possible to access the relative period functions in postgres?
>>
>> If so, does anybody know how?
>>
>> Like these ones:
>>
>> LAST_MONTH, LAST_BIMONTH, LAST_QUARTER, LAST_SIX_MONTH, MONTHS_THIS_YEAR, QUARTERS_THIS_YEAR,
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>

References