Conditional Formula; Shred by Date

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
I am hoping to generate a date field or text field (Shred by Date) based off the following conditions:

If client's age at discharge is (equal to or > 18) shred by date = discharge date + 7 years. 
If client's age at discharge is (<18) shred by date = (however many years until the client is 18 + 7 years).

I currently have the following fields already created, but do not know how to make the appropriate formula for the "shred by date" field.

Client's DOB
Client's current age (formula field)
Client's discharge date
Client's age at discharge (formula field)
Photo of Courtney

Courtney

  • 32 Points
  • confused

Posted 2 years ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
If([Client's Age at Discharge]<18,
[Client's DOB]+Years(25),
[Client Discharge Date]+Years(7))
Photo of Courtney

Courtney

  • 32 Points
THANK YOU! Worked perfectly, except I had to use days instead of years. 
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
My mistake on the years.

A better use is: 

If([Client's Age at Discharge]<18,
AdjustYear([Client's DOB], 25),
AdjustYear([Client Discharge Date], 7))