Skip to main content
Solved

DATETIME_DIFF showing Negative Result

  • May 21, 2021
  • 2 replies
  • 28 views

Forum|alt.badge.img+3

So im trying to calculate days that are left for a project to end.
Im using
DATETIME_DIFF({End Date}, TODAY(), ‘days’) but some ended projects show -2 (the ones that ended 2 days ago) how can I make them just stay at 0? Maybe an if condition. But Cant seem to find it. Thanks!

Best answer by Kamille_Parks11

MAX(0, DATETIME_DIFF({End Date}, TODAY(), 'days'))

2 replies

Kamille_Parks11
Forum|alt.badge.img+27
MAX(0, DATETIME_DIFF({End Date}, TODAY(), 'days'))

Forum|alt.badge.img+3
  • Author
  • Participating Frequently
  • May 21, 2021

Works! I appreciate it! :clap: