Skip to main content

Hide negative integer when using DATETIME_FORMAT

  • December 4, 2019
  • 2 replies
  • 15 views

I am trying to calculate the number of dates between when a project came in house and today’s date, so I can show how many days it has been in house. I am using the following formula, which works well. But, of course it results in a negative number of days, since the in date it came in is lower than today’s date. So for instance, if a project came in on 12/01 and today is 12/05, I would like it to show 4 days in house, not “-4”. Is there a way to suppress the negative symbol and just output the 4?

DATETIME_DIFF({Request Date}, TODAY(), ‘days’)

^^ That is the function I am currently using

2 replies

JonathanBowen
Forum|alt.badge.img+18

Hi @Nora_Kramer - just flip them around:

DATETIME_DIFF(TODAY(), {Request Date}, 'days')

:slightly_smiling_face:

JB


  • Author
  • New Participant
  • December 4, 2019

Hi @Nora_Kramer - just flip them around:

DATETIME_DIFF(TODAY(), {Request Date}, 'days')

:slightly_smiling_face:

JB


Oh my gosh! :woman_facepalming: Brilliant! Der…why did’t I think of that. Worked great!