Days Left

Days Left

From
Facebook
Status
Updating
Share
Entries

Days Left V1

dateBetween(prop("Due date"), now(), "days")

Days Left V2

if(empty(prop("Due date")) or round(dateBetween(prop("Due date"), now(), "hours")) <= 0, toNumber(""), round(dateBetween(prop("Due date"), now(), "hours") / 24 * 10) / 10)
if(empty(prop("Due date")) or round(dateBetween(prop("Due date"), now(), "hours")) <= 0,
Checks to see if Due date is empty or the number of hours between the current date and the Due Date is less than or equal to 0.
toNumber(""),
If either are true, it converts a blank result to a number, which returns a blank cell instead of a 0.
dateBetween(prop("Due date"), now(), "hours") / 24
If either are untrue, it takes the number of hours between the current date and the Due Date and divides it by 24 to get the number of days to a decimal place.
round( ... * 10) / 10
This takes the result from the section above and multiplies it by 10 and then rounds it. It then divides it by 10 to move the decimal place back one place.
 
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!