Skip to main content

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

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?


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


Reply