Days Left & Priority Formulas

Days Left & Priority Formulas

From
Facebook
Status
Updating
Share
Entries

Days Left

(prop("Deadline") > now()) ? dateBetween(prop("Deadline"), now(), "days") : 0
(prop("Deadline") > now())
If Deadline is past current date, do the following.
? dateBetween(prop("Deadline"), now(), "days")
Display the number of days between the current date and Deadline
: 0
Otherwise display 0

Priority

empty(prop("Deadline")) ? "" : ((prop("Days Left") == 0) ? "❌ Past Date" : ((prop("Days Left") <= 2) ? "🚨 Danger Zone" : ((prop("Days Left") <= 7) ? "👌 Final Touches" : ((prop("Days Left") <= 14) ? "😤 Get to Work" : ((prop("Days Left") <= 30) ? "👨‍🍳 Prepare" : "")))))
empty(prop("Deadline")) ? ""
If Deadline is empty, display nothing.
: ((prop("Days Left") == 0) ? "❌ Past Date"
Otherwise if Days Left is 0, display Past Date
: ((prop("Days Left") <= 2) ? "🚨 Danger Zone"
Otherwise if Days Left is equal or less than 2, display Danger Zone
: ((prop("Days Left") <= 7) ? "👌 Final Touches"
Otherwise if Days Left is equal or less than 7, display Final Touches
: ((prop("Days Left") <= 14) ? "😤 Get to Work"
Otherwise if Days Left is equal or less than 14, display Get to Work
: ((prop("Days Left") <= 30) ? "👨‍🍳 Prepare" : "")))))
Otherwise if Days Left is equal or less than 30, display Prepare
⚠️
Change lowercase w to uppercase W if your weeks start on Monday.

This Week

formatDate(now(), "wY") == formatDate(prop("Deadline"), "wY")

Filter

This Week Is ☑️

This Month

formatDate(now(), "MY") == formatDate(prop("Deadline"), "MY")

Filter

This Month Is ☑️

Updates

Entries
By Ben  •  Latest  •  Was this helpful? Please consider buying me a coffee. Cheers!By Ben  •  Latest  •  Was this helpful? Please consider buying me a coffee. Cheers!
By BenLatest • Was this helpful? Please consider buying me a coffee. Cheers!
 
Priority (Old)
and(prop("Days Left") >= 15, prop("Days Left") < 30) ? "👨‍🍳 Prepare" : (and(prop("Days Left") >= 8, prop("Days Left") <= 14) ? "😤 Get to Work" : (and(prop("Days Left") >= 3, prop("Days Left") <= 7) ? "👌 Final Touches" : (and(prop("Days Left") > 0, prop("Days Left") <= 2) ? "🚨 Danger Zone" : (and(prop("Days Left") == 0, not empty(prop("Deadline"))) ? "❌ Past Date" : ""))))
and(prop("Days Left") >= 15, prop("Days Left") < 30) ? "👨‍🍳 Prepare"
If Days Left is between 30 and 15 display 👨‍🍳 Prepare
: (and(prop("Days Left") >= 8, prop("Days Left") <= 14) ? "😤 Get to Work"
Otherwise if Days Left is between 14 and 8 display 😤 Get to Work
: (and(prop("Days Left") >= 3, prop("Days Left") <= 7) ? "👌 Final Touches"
Otherwise if Days Left is between 7 and 3 display 👌 Final Touches
: (and(prop("Days Left") > 0, prop("Days Left") <= 2) ? "🚨 Danger Zone"
Otherwise if Days Left is between 2 and 0 display 🚨 Danger Zone
: (and(prop("Days Left") == 0, not empty(prop("Deadline"))) ? "❌ Past Date"
Otherwise if Days Left is 0 and Deadline is not empty display ❌ Past Date
: ""))))
Otherwise display nothing.