← Back to team overview

dhis2-users team mailing list archive

Re: Program Indicator calculations, Converting Dates in Months or Years

 

Dear Andrew,

You can use (V{current_date} - A{Date of Birth UID})/30 to estimate months
or (V{current_date} - A{Date of Birth UID})/365 to get estimate years.

Alex

On Fri, Nov 4, 2016 at 3:06 PM, Alex Tumwesigye <atumwesigye@xxxxxxxxx>
wrote:

> Dear Andrew,
>
> You can use (current_date - Date of Birth)/30 to estimate months or
> (current_date - Date of Birth)/365 to get estimate years.
>
> Alex
>
> On Fri, Nov 4, 2016 at 2:52 PM, Lars Helge Øverland <lars@xxxxxxxxx>
> wrote:
>
>> Hi Andrew,
>>
>> how are you doing? First of all, would you mind asking this on the dev
>> list? There are more people who can help you there.
>>
>> Also it would be good if you could elaborate a bit about what you need to
>> do regarding date conversion. Is the problem that you are asking
>> beneficiaries about their age in months, and that you later would like to
>> do aggregation based on months/quarters in dhis analytics apps?
>>
>> best regards,
>>
>> Lars
>>
>>
>>
>>
>>
>> On Fri, Oct 28, 2016 at 12:22 PM, Muhire Andrew <muhireandrew@xxxxxxxxx>
>> wrote:
>>
>>> Dear All,
>>>
>>> We are developing the case based nutrition system [Using DHIS2] that is
>>> targeting to track Pregnant Women, Lactating and Children under 2years.What
>>> we are tracking is Attributes and tracker variables like Date of Birth,
>>> hight, weight, LMP Date and We would like to Display on our program
>>> dashboard the indicators like BMI, Height for Age, Weight for Age and also
>>> expected deliveries using the LMP dates which is our data element that is
>>> set to date type.
>>>
>>> Is there anyone who knows how to convert the dates into Months or years
>>> without use of coding, i mean during the calculation of Program indicators?
>>> . We also need users to enter the date of Birth of a Baby or Mother and the
>>> system popup the Age in months or Years.
>>>
>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> lars@xxxxxxxxx
>> http://www.dhis2.org <https://www.dhis2.org/>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Alex Tumwesigye
>
> Technical Advisor - DHIS2 (Consultant),
> Ministry of Health/AFENET  | HISP Uganda
> Kampala
> Uganda
> +256 774149 775, + 256 759 800161
> Skype ID: talexie
>
> IT Consultant (Servers, Networks and Security, Health Information Systems
> - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant
>
>
> "I don't want to be anything other than what I have been - one tree hill "
>



-- 
Alex Tumwesigye

Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET  | HISP Uganda
Kampala
Uganda
+256 774149 775, + 256 759 800161
Skype ID: talexie

IT Consultant (Servers, Networks and Security, Health Information Systems -
DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant


"I don't want to be anything other than what I have been - one tree hill "

Follow ups

References