PSA: Replace Now() with a lower-resolution real time clock for heavy formulas

Sometimes you need to calculate things based on current time (e.g. conditionally format tasks that are due, or show different text values for when the time is in the past or in the future). And sometimes those calculations are quite heavy.

What to do when you don’t need the precision of Now() (which updates and triggers recalculations a few times per second), but Today() is too coarse too?

Answer: make a less granular counter and depend on that. E.g., for minute-precision make a named formula DateTimeTruncate(Now(), "minute")

Coda will recalculate this formula every time Now() changes (i.e. multiple times a second), BUT will not recalculate anything depending on this coarse timer as long as its [cached] value stays the same (i.e. for the entirety of a minute):

8 Likes