Forum Discussion

ArchiveUser's avatar
ArchiveUser
Qrew Captain
8 years ago

How do I include or exclude a person within a date range with just a person's birth date and today date?

 I need to set this formula up over six potential date ranges that a person's record in the database could fall into. The only null condition I can think of is if a data entry person forgets to put the birthdate in the persons record during the intake process.

16 Replies

  • I have attached a jpg of the data requested in a monthly report that segregates the age categories needed for reporting. Maybe I am approaching this problem the wrong way??? Should this be done through the QB reports process?
  • OK, I f you want to easily create a report to look like that, yes I see why you would want to have separate fields.  You would want that to be a numeric formula field to calculate to a 1 or a 0.

    var date DOB = [Date of Birth];

    var number AGE =
    Year(Today())-Year($DOB)
    -
    If(Month(Today())<Month($DOB)
    or
    (Month(Today())=Month($DOB) and Day(Today())<Day($DOB)),1,0);

    If(IsNull($DOB), 0, $AGE <=11, 1,0)


    I did test the formula I originally posted and it worked for me.  Contact me via the information in my profile if you would like some one on one assistance.
  • I think I am getting it. Just a question on the ranges; For the next age range, '12-15' is the last formula this:     If(IsNull($DOB), 0, $AGE >11<=15, 1,0)
  • Thanks. I have added the fields based on each age category and tested it with various DOB's. It looks good. It's working! Thanks so much for your help. I am not sure I would have been able to get this one on my own.