Skip to main content
eradwan
Newcomer
Newcomer
April 28, 2024
Solved

Formula Field

  • April 28, 2024
  • 3 replies
  • 230 views

Hello, 

Trying to create formula field to validate age age 18 years or above and when I used the Datediff and created date of birth filed and today’s date but I keep getting the below error message, any recommendation on the correct steps? 

 

 

Best answer by Michael.Rave

@eradwan 

The formula would need to look like this:

if(DateDiff( [DateSigned1] ,[Date of Birth])>=6574,1,0)

Using the Date Signed field for todays date (data label is “DateSigned1”) and a text field with date field validation (data label is “Date of Birth”). The conditional logic will show the “Over 18 years” field when the value is 1 and the “Under 18 years” field when the value is 0. The formula field color is set to White, so it is invisible. I forgot to make the two outcome fields “read only”, I would recommend to do that as well.

Outcome with same date 18 years ago:

 

Outcome with other date, under 18 years:

 

Important: Due to leap year, in the formula 6574 or 6575 days could actually mean 18 years.

3 replies

Justin Jiang
Established Contributor
Established Contributor
April 28, 2024

Do you have any integrations or this is only eSignature.

 

Welcome to the DocuSign Community and University! Your feedback is immensely appreciated. If this answer resolves your issue, please feel free to give it a Like and mark it as the "Best Answer". This helps others in the community find the information they need. Visit us at http://dsucustomers.docusign.com for more resources and support.
Michael.Rave
Docusign Employee
Docusign Employee
April 29, 2024

@eradwan 

The formula would need to look like this:

if(DateDiff( [DateSigned1] ,[Date of Birth])>=6574,1,0)

Using the Date Signed field for todays date (data label is “DateSigned1”) and a text field with date field validation (data label is “Date of Birth”). The conditional logic will show the “Over 18 years” field when the value is 1 and the “Under 18 years” field when the value is 0. The formula field color is set to White, so it is invisible. I forgot to make the two outcome fields “read only”, I would recommend to do that as well.

Outcome with same date 18 years ago:

 

Outcome with other date, under 18 years:

 

Important: Due to leap year, in the formula 6574 or 6575 days could actually mean 18 years.

"Select as Best" below if you find my answer is a valid solution to your issue and mark it as resolved.
Docusign Employee
May 13, 2024

Hi @eradwan,

 

I hope you are doing well.

 

I would like to confirm if you were able to solve your issue by utilizing the solution that was suggested? 

 

If so, please mark it as the best answer by clicking “Select as Best” to make it easier for other users to find.

 

Otherwise, feel free to let me know and I will gladly help you address the situation as soon as possible.

 

Best regards,   

Alejandro R. | Docusign Community Moderator   

"Select as Best" below if you find the answer a valid solution to your issue!