date validation

Is there an easy way to validate that age and a date of birth are valid. For example, if specify that I am 20, then my birthday must be between 6/17/1995 and today. I have tried a bunch of contraints, and nothing seems to work.

Actually I see this now: https://groups.google.com/forum/#!searchin/kobo-users/date/kobo-users/9KKqoQ1UqM4/bvy7Aik0jrAJ

How can I import this XML?

···

On Tuesday, June 16, 2015 at 4:40:42 PM UTC-6, Adam Preston wrote:

Is there an easy way to validate that age and a date of birth are valid. For example, if specify that I am 20, then my birthday must be between 6/17/1995 and today. I have tried a bunch of contraints, and nothing seems to work.

NEvermind, guys. I am moving this to the ODK group.

···

On Tuesday, June 16, 2015 at 4:42:11 PM UTC-6, Adam Preston wrote:

Actually I see this now: https://groups.google.com/forum/#!searchin/kobo-users/date/kobo-users/9KKqoQ1UqM4/bvy7Aik0jrAJ

How can I import this XML?

On Tuesday, June 16, 2015 at 4:40:42 PM UTC-6, Adam Preston wrote:

Is there an easy way to validate that age and a date of birth are valid. For example, if specify that I am 20, then my birthday must be between 6/17/1995 and today. I have tried a bunch of contraints, and nothing seems to work.

Hi Adam,

What you need to do in this case is first calculate the age based on the date of birth, then round it. This will give you the current age in years. Then you can use validation logic to check if the two ages are the same. Note that since age is given in completed years and never rounded up, you have to subtract 0.5 (see the formula below and in the attached form).

Best,

Tino

Inline image 2

age_validation.xls (59 KB)

age_validation.xls (59 KB)

···

On Tue, Jun 16, 2015 at 6:40 PM, Adam Preston adama...@gmail.com wrote:

Is there an easy way to validate that age and a date of birth are valid. For example, if specify that I am 20, then my birthday must be between 6/17/1995 and today. I have tried a bunch of contraints, and nothing seems to work.

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at http://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.

Thank you sooooooooo much!

···

On Tuesday, June 23, 2015 at 1:23:38 PM UTC-6, Tino Kreutzer wrote:

Hi Adam,

What you need to do in this case is first calculate the age based on the date of birth, then round it. This will give you the current age in years. Then you can use validation logic to check if the two ages are the same. Note that since age is given in completed years and never rounded up, you have to subtract 0.5 (see the formula below and in the attached form).

Best,

Tino

On Tue, Jun 16, 2015 at 6:40 PM, Adam Preston adam...@gmail.com wrote:

Is there an easy way to validate that age and a date of birth are valid. For example, if specify that I am 20, then my birthday must be between 6/17/1995 and today. I have tried a bunch of contraints, and nothing seems to work.

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-us...@googlegroups.com.

To post to this group, send email to kobo...@googlegroups.com.

Visit this group at http://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.