Getting a negative integer when calculating age

Hello again,
I am trying to calculate age in years and months from date of birth in tracker program. i have used the program rule with the following function d2:yearsBetween( V{current_date}, #{HT_Child Date of Birth} ) however when i enter a date of birth the result is correct in number but it is in a negative form so for example if the age is 4 years i get -4
i tried changing the parameters date of birth - current date …still i get the same result
can anyone let me know why am getting this result.?
with much appreciation

Hi @Haliz.t

I think you might be having a cache issue. Have you tried clearing the cache?

I have quickly prepared the following Program Rule:

Which leads me to this which I what I think you are looking for:

1 Like