
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 03, 2020 08:49 PM
I run a pet relocation company and we have many clients who hold their pet files with us in case of a future move. We need a formula that red flags when a vaccination expiry date is imminent (e.g. in 14 days, in 28 days, etc). Really struggling with how we can incorporate this into airtable.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 03, 2020 09:29 PM
You’re welcome Kristy :slightly_smiling_face:
There are several ways to do so.
I personally would use the Flag in the formula. So it becomes something like:
IF(DateTime_Diff({Vaccination Exp Date}, Today(), 'days')<=14,"⚠️ 14 Days or Less Till Vaccination Expiry", IF(DateTime_Diff({Vaccination Exp Date}, Today(), 'days')<=28,"28 Days or Less Till Vaccination Expiry")
This works for 14 days and 28 days, if you want to add more warnings, you can add more IF statements.
Feel free to add emojis to your formula from here
Your screenshot was not attached btw.
BR,
Mo

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 03, 2020 08:57 PM
Hi @Kirsty_Kavanagh,
Welcome to Airtable Community! :slightly_smiling_face:
You can create a formula field that is something like
DateTime_Diff({Vaccination Exp Date}, Today(), 'days')
This will give you the number of days till vaccination expires. You can then create views (or add it in the formula if you want) that filters when this number is 28 or less, 14 or less, and so on.
Hope that helps. If it does, please mark this as a Solution so others can see it.
BR,
Mo

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 03, 2020 09:11 PM
Hi
Thank you Mohamed. That sounds exactly what we need. How does the flag work? Do we need an additional field for a flag to show, or does it highlight the record. If the latter, how does it highlight it?
(Attachment image001.tiff is missing)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 03, 2020 09:26 PM
You can use nested IF
statements with DATETIME_DIFF
in a formula field:
IF(
DATETIME_DIFF({vaccineExpiryDate), TODAY(), 'days') < 0,
"vaccine overdue",
IF(
DATETIME_DIFF({vaccineExpiryDate), TODAY(), 'days') < 14,
"vaccine due very soon",
IF(
DATETIME_DIFF({vaccineExpiryDate), TODAY(), 'days') < 28,
"vaccine due soon"
)
)
)
If you want the record to be associated with a color (and you have a pro subscription) you can use record coloring.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 03, 2020 09:29 PM
You’re welcome Kristy :slightly_smiling_face:
There are several ways to do so.
I personally would use the Flag in the formula. So it becomes something like:
IF(DateTime_Diff({Vaccination Exp Date}, Today(), 'days')<=14,"⚠️ 14 Days or Less Till Vaccination Expiry", IF(DateTime_Diff({Vaccination Exp Date}, Today(), 'days')<=28,"28 Days or Less Till Vaccination Expiry")
This works for 14 days and 28 days, if you want to add more warnings, you can add more IF statements.
Feel free to add emojis to your formula from here
Your screenshot was not attached btw.
BR,
Mo
