date validation

340 views
Skip to first unread message

Adam Preston

unread,
Jun 16, 2015, 6:40:42 PM6/16/15
to kobo-...@googlegroups.com
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.

Adam Preston

unread,
Jun 16, 2015, 6:42:11 PM6/16/15
to kobo-...@googlegroups.com

Adam Preston

unread,
Jun 19, 2015, 1:53:23 PM6/19/15
to kobo-...@googlegroups.com
NEvermind, guys. I am moving this to the ODK group.

Tino Kreutzer

unread,
Jun 23, 2015, 3:23:38 PM6/23/15
to kobo-...@googlegroups.com
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

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.

age_validation.xls
age_validation.xls

Adam Preston

unread,
Jul 13, 2015, 4:12:18 PM7/13/15
to kobo-...@googlegroups.com


Thank you sooooooooo much!
Reply all
Reply to author
Forward
0 new messages