Age calculation not correct?

Hi CommCare Users,

I have a hidden value that calculates the age of subject depending on what
date date of birth is entered by a health worker. Dates >= 01/01/1970
display the correct age but dates before that Unix time do no return the
correct calculation. Consequently, the app flow is greatly affected. I used
this formula to calculate age:

  • Age in years: int((today() - date(/data/dob)) div 365.25)

If I enter DOB as for example 01/01/1965, the calculation is not displayed,
could someone please help me out?

Thanks,
James

Hi James,

I tried to replicate the problem you've described on my phone and was
unable to. Using your formula I was able to correctly calculate age values
pre-Unix epoch. Did you try testing your form in Cloudcare?

If you believe it is a bug, will you please report it on CommCare HQ via
the "Report an Issue"? Be sure to provide as much context as possible to
enable us to reconstruct your problem.

Thanks,
Phillip

··· On Mon, Mar 16, 2015 at 4:34 PM, James Tinkamanyire < jamestinkamanyire@gmail.com> wrote:

Hi CommCare Users,

I have a hidden value that calculates the age of subject depending on what
date date of birth is entered by a health worker. Dates >= 01/01/1970
display the correct age but dates before that Unix time do no return the
correct calculation. Consequently, the app flow is greatly affected. I used
this formula to calculate age:

  • Age in years: int((today() - date(/data/dob)) div 365.25)

If I enter DOB as for example 01/01/1965, the calculation is not
displayed, could someone please help me out?

Thanks,
James

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Phillips,

Thanks for prompt response. I just tested the form in CloudCare but still
no desired result. I have attached 2 screenshots with DOB pre-Unix Epoch
and DOB post-unix Epoch. Do you mind taking a look, please?

I am going to report a bug via the CommCare mobile tool as well.

Thanks,
James

··· On 17 March 2015 at 00:23, Phillip Mates wrote:

Hi James,

I tried to replicate the problem you've described on my phone and was
unable to. Using your formula I was able to correctly calculate age values
pre-Unix epoch. Did you try testing your form in Cloudcare?

If you believe it is a bug, will you please report it on CommCare HQ via
the "Report an Issue"? Be sure to provide as much context as possible to
enable us to reconstruct your problem.

Thanks,
Phillip

On Mon, Mar 16, 2015 at 4:34 PM, James Tinkamanyire < jamestinkamanyire@gmail.com> wrote:

Hi CommCare Users,

I have a hidden value that calculates the age of subject depending on
what date date of birth is entered by a health worker. Dates >= 01/01/1970
display the correct age but dates before that Unix time do no return the
correct calculation. Consequently, the app flow is greatly affected. I used
this formula to calculate age:

  • Age in years: int((today() - date(/data/dob)) div 365.25)

If I enter DOB as for example 01/01/1965, the calculation is not
displayed, could someone please help me out?

Thanks,
James

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the
Google Groups "commcare-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/commcare-users/UuuwCJFWGQo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

*James Tinkamanyire *| Data Manager

Measuring Early Treatment Adherence - META ProjectGlobal Health
Collaborative - MUST - Uganda

P.O. Box 1397, Mbarara.

BSc Computer EngineeringMBARARA UNIVERSITY OF SCIENCE & TECHNOLOGYP.O. Box
1410, Mbarara, Uganda.

Mobile Tel: +256 (0)702 864 964
Work Tel: +256 776 864 965
Skype: jimmyjaymes1
Alt email: jtinkamanyire samira@mgh.harvard.edu@mustresearch.org
http://www.mghcgh.org/
Website: www.ghc.org http://www.mghcgh.org/

James,

This calculation is currently working for me in a test form that I've
attached (the age/dob calculation was copied and pasted from yours). Can
you confirm whether this form replicates the same behavior you're seeing in
cloudcare?

-Clayton

Date One Liners.xml (8.12 KB)

··· On Tue, Mar 17, 2015 at 1:54 PM, James Tinkamanyire < jamestinkamanyire@gmail.com> wrote:

Hi Phillips,

Thanks for prompt response. I just tested the form in CloudCare but still
no desired result. I have attached 2 screenshots with DOB pre-Unix Epoch
and DOB post-unix Epoch. Do you mind taking a look, please?

I am going to report a bug via the CommCare mobile tool as well.

Thanks,
James

On 17 March 2015 at 00:23, Phillip Mates pmates@dimagi.com wrote:

Hi James,

I tried to replicate the problem you've described on my phone and was
unable to. Using your formula I was able to correctly calculate age values
pre-Unix epoch. Did you try testing your form in Cloudcare?

If you believe it is a bug, will you please report it on CommCare HQ via
the "Report an Issue"? Be sure to provide as much context as possible to
enable us to reconstruct your problem.

Thanks,
Phillip

On Mon, Mar 16, 2015 at 4:34 PM, James Tinkamanyire < jamestinkamanyire@gmail.com> wrote:

Hi CommCare Users,

I have a hidden value that calculates the age of subject depending on
what date date of birth is entered by a health worker. Dates >= 01/01/1970
display the correct age but dates before that Unix time do no return the
correct calculation. Consequently, the app flow is greatly affected. I used
this formula to calculate age:

  • Age in years: int((today() - date(/data/dob)) div 365.25)

If I enter DOB as for example 01/01/1965, the calculation is not
displayed, could someone please help me out?

Thanks,
James

--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the
Google Groups "commcare-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/commcare-users/UuuwCJFWGQo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

*James Tinkamanyire *| Data Manager

Measuring Early Treatment Adherence - META ProjectGlobal Health
Collaborative - MUST - Uganda

P.O. Box 1397, Mbarara.

BSc Computer EngineeringMBARARA UNIVERSITY OF SCIENCE & TECHNOLOGYP.O.
Box 1410, Mbarara, Uganda.

Mobile Tel: +256 (0)702 864 964
Work Tel: +256 776 864 965
Skype: jimmyjaymes1
Alt email: jtinkamanyire samira@mgh.harvard.edu@mustresearch.org
http://www.mghcgh.org/
Website: www.ghc.org http://www.mghcgh.org/

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Clayton,

I see that your test form is in an xml file but I am unable to view it's
content. I have tried diff DOBs several times on CloudCare and on CommCare
mobile but I still do not get a similar output as I expect if the DOB is
pre-Unix Epoch and when it's after. Did you look at the two test forms I
attached?

Thank you,
James

··· On 18 March 2015 at 23:35, Clayton Sims wrote:

James,

This calculation is currently working for me in a test form that I've
attached (the age/dob calculation was copied and pasted from yours). Can
you confirm whether this form replicates the same behavior you're seeing in
cloudcare?

-Clayton

On Tue, Mar 17, 2015 at 1:54 PM, James Tinkamanyire < jamestinkamanyire@gmail.com> wrote:

Hi Phillips,

Thanks for prompt response. I just tested the form in CloudCare but still
no desired result. I have attached 2 screenshots with DOB pre-Unix Epoch
and DOB post-unix Epoch. Do you mind taking a look, please?

I am going to report a bug via the CommCare mobile tool as well.

Thanks,
James

On 17 March 2015 at 00:23, Phillip Mates pmates@dimagi.com wrote:

Hi James,

I tried to replicate the problem you've described on my phone and was
unable to. Using your formula I was able to correctly calculate age values
pre-Unix epoch. Did you try testing your form in Cloudcare?

If you believe it is a bug, will you please report it on CommCare HQ via
the "Report an Issue"? Be sure to provide as much context as possible to
enable us to reconstruct your problem.

Thanks,
Phillip

On Mon, Mar 16, 2015 at 4:34 PM, James Tinkamanyire < jamestinkamanyire@gmail.com> wrote:

Hi CommCare Users,

I have a hidden value that calculates the age of subject depending on
what date date of birth is entered by a health worker. Dates >= 01/01/1970
display the correct age but dates before that Unix time do no return the
correct calculation. Consequently, the app flow is greatly affected. I used
this formula to calculate age:

  • Age in years: int((today() - date(/data/dob)) div 365.25)

If I enter DOB as for example 01/01/1965, the calculation is not
displayed, could someone please help me out?

Thanks,
James

--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the
Google Groups "commcare-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/commcare-users/UuuwCJFWGQo/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

*James Tinkamanyire *| Data Manager

Measuring Early Treatment Adherence - META ProjectGlobal Health
Collaborative - MUST - Uganda

P.O. Box 1397, Mbarara.

BSc Computer EngineeringMBARARA UNIVERSITY OF SCIENCE & TECHNOLOGYP.O.
Box 1410, Mbarara, Uganda.

Mobile Tel: +256 (0)702 864 964
Work Tel: +256 776 864 965
Skype: jimmyjaymes1
Alt email: jtinkamanyire samira@mgh.harvard.edu@mustresearch.org
http://www.mghcgh.org/
Website: www.ghc.org http://www.mghcgh.org/

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the
Google Groups "commcare-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/commcare-users/UuuwCJFWGQo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

*James Tinkamanyire *| Data Manager

Measuring Early Treatment Adherence - META ProjectGlobal Health
Collaborative - MUST - Uganda

P.O. Box 1397, Mbarara.

BSc Computer EngineeringMBARARA UNIVERSITY OF SCIENCE & TECHNOLOGYP.O. Box
1410, Mbarara, Uganda.

Mobile Tel: +256 (0)702 864 964
Work Tel: +256 776 864 965
Skype: jimmyjaymes1
Alt email: jtinkamanyire samira@mgh.harvard.edu@mustresearch.org
http://www.mghcgh.org/
Website: www.ghc.org http://www.mghcgh.org/

Hi commcare users

Can you share me about fixture. Can we monitor to our mobile worker by
fixture option?

··· On Thu, Mar 19, 2015 at 4:23 AM, James Tinkamanyire < jamestinkamanyire@gmail.com> wrote:

Hi Clayton,

I see that your test form is in an xml file but I am unable to view it's
content. I have tried diff DOBs several times on CloudCare and on CommCare
mobile but I still do not get a similar output as I expect if the DOB is
pre-Unix Epoch and when it's after. Did you look at the two test forms I
attached?

Thank you,
James

On 18 March 2015 at 23:35, Clayton Sims csims@dimagi.com wrote:

James,

This calculation is currently working for me in a test form that I've
attached (the age/dob calculation was copied and pasted from yours). Can
you confirm whether this form replicates the same behavior you're seeing in
cloudcare?

-Clayton

On Tue, Mar 17, 2015 at 1:54 PM, James Tinkamanyire < jamestinkamanyire@gmail.com> wrote:

Hi Phillips,

Thanks for prompt response. I just tested the form in CloudCare but
still no desired result. I have attached 2 screenshots with DOB pre-Unix
Epoch and DOB post-unix Epoch. Do you mind taking a look, please?

I am going to report a bug via the CommCare mobile tool as well.

Thanks,
James

On 17 March 2015 at 00:23, Phillip Mates pmates@dimagi.com wrote:

Hi James,

I tried to replicate the problem you've described on my phone and was
unable to. Using your formula I was able to correctly calculate age values
pre-Unix epoch. Did you try testing your form in Cloudcare?

If you believe it is a bug, will you please report it on CommCare HQ
via the "Report an Issue"? Be sure to provide as much context as possible
to enable us to reconstruct your problem.

Thanks,
Phillip

On Mon, Mar 16, 2015 at 4:34 PM, James Tinkamanyire < jamestinkamanyire@gmail.com> wrote:

Hi CommCare Users,

I have a hidden value that calculates the age of subject depending on
what date date of birth is entered by a health worker. Dates >= 01/01/1970
display the correct age but dates before that Unix time do no return the
correct calculation. Consequently, the app flow is greatly affected. I used
this formula to calculate age:

  • Age in years: int((today() - date(/data/dob)) div 365.25)

If I enter DOB as for example 01/01/1965, the calculation is not
displayed, could someone please help me out?

Thanks,
James

--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the
Google Groups "commcare-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/commcare-users/UuuwCJFWGQo/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

*James Tinkamanyire *| Data Manager

Measuring Early Treatment Adherence - META ProjectGlobal Health
Collaborative - MUST - Uganda

P.O. Box 1397, Mbarara.

BSc Computer EngineeringMBARARA UNIVERSITY OF SCIENCE & TECHNOLOGYP.O.
Box 1410, Mbarara, Uganda.

Mobile Tel: +256 (0)702 864 964
Work Tel: +256 776 864 965
Skype: jimmyjaymes1
Alt email: jtinkamanyire samira@mgh.harvard.edu@mustresearch.org
http://www.mghcgh.org/
Website: www.ghc.org http://www.mghcgh.org/

--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the
Google Groups "commcare-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/commcare-users/UuuwCJFWGQo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

*James Tinkamanyire *| Data Manager

Measuring Early Treatment Adherence - META ProjectGlobal Health
Collaborative - MUST - Uganda

P.O. Box 1397, Mbarara.

BSc Computer EngineeringMBARARA UNIVERSITY OF SCIENCE & TECHNOLOGYP.O.
Box 1410, Mbarara, Uganda.

Mobile Tel: +256 (0)702 864 964
Work Tel: +256 776 864 965
Skype: jimmyjaymes1
Alt email: jtinkamanyire samira@mgh.harvard.edu@mustresearch.org
http://www.mghcgh.org/
Website: www.ghc.org http://www.mghcgh.org/

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.