Project Status

Project Status

Status

lets( dt, prop("Date").formatDate("L"), db, prop("Date").dateBetween(now(), "days"), ifs( dt == now().formatDate("L"), "Due Today", dt == now().dateAdd(1, "days").formatDate("L"), "Due Tomorrow", now() > prop("Date"), "Overdue", db > 2, db + " days left" ) )
⚠️
The database above uses a formula to calculate the Date property so the example stays current. The Status formula will work as required when using a regular date property.
Old Explanation
if(empty(prop("Date")), "",
If Date is empty, display nothing.
if(formatDate(prop("Date"), "L") == formatDate(now(), "L"), "Due Today",
Otherwise if Date in MM/DD/YYYY format matches the same for the current date, display Due Today.
if(formatDate(prop("Date"), "L") == formatDate(dateAdd(now(), 1, "days"), "L"), "Due Tomorrow",
Otherwise if Date in MM/DD/YYYY format matches the same for the current date with one day added, display Due Tomorrow.
if(now() > prop("Date"), "Overdue",
Otherwise if the current date is greater than Date, display Overdue.
if(dateBetween(prop("Date"), now(), "days") > 2, format(dateBetween(prop("Date"), now(), "days")) + " days left",
Otherwise if the number of days between Date and the current date is more than 2, display [total] days left.
"")))))
Otherwise if the number of days between Date and the current date is less than 2, display nothing.
 
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!