Skip to main content
Question

Re:age validation

  • March 26, 2024
  • 0 replies
  • 170 views

Forum|alt.badge.img+4

please help me in creating a formula text field that checks whether the candidate is 18yrs or older  based on the dob field



------------------------------
vikas pasula
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24

np,

Here is the formula for a formula checkbox field.

var date DOB = [DOB]; // put in your Date of Birth field here

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

$Age >= 18



------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------

DwightMunson1
Forum|alt.badge.img+8

I use this formula to get the employee's current anniversary year. 

Floor(ToDays(Today()-[Sigma Employment Date])/365.25)

----------------------------------------------------------------

var date DOB = [Your Date of Birth Field];

var number Age = Floor(ToDays(Today()-$DOB/365.25);

If(

$Age >= 18, "older",

"less than 18 years old"

)



------------------------------
Dwight Munson
------------------------------