Help

Date Formula - flagging insufficient number of dates between actions

Topic Labels: Formulas
1182 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Kirsty_Kavanagh
4 - Data Explorer
4 - Data Explorer

I run a pet relocation company and when preparing pet travel paperwork we need to ensure that there are a certain number of days between the dob and a vaccination, or travel date, etc. We need a formula that red flags when one date is not within/above a specific range of another date (or the current date).

Thank you in advance

2 Replies 2

Take a look at the IF and DATETIME_DIFF functions in the formula field reference.

IF(
  DATETIME_DIFF({travel date}, {dob}, 'days') < {ageToTravel},
  "too young to travel on that date"
)
IF(
  DATETIME_DIFF(TODAY(), {dob}, 'days') < {ageForVaccine},
  "too young for vaccine today"
)

These formulas calculate the date/time difference in age, but you can also use ‘weeks’, ‘months’, or ‘years’ as the unit specifier for DATETIME_DIFF.


If this answers your question, please mark this post as the solution. Otherwise, could you please give a bit more details and a screen capture?

Kirsty_Kavanagh
4 - Data Explorer
4 - Data Explorer

Thank you! We will try this and see how we get on.