Forum Discussion

peegee68's avatar
peegee68
Frequent Visitor
2 years ago
Solved

Inversing numeric columns +/-

Hi,   I'm a rookie stuck on this one, and after searching around for a little while thought I'd ask the community for help.   I have created a custom column to work out the difference in days bet...
  • TomMartens's avatar
    2 years ago

    Hey peegee68,

     

    this formula

    Duration.Days(DateTime.Date(DateTimeZone.UtcNow()) - [Due Date]) * -1

    is inversing the values:

    As you can see the future due date is positive, future, from today's perspective:


    From a performance point of view, I recommend calculating the difference and inversing the result in a single formula.

     

    Hopefully, this provides what you are looking for.

     

    Regards,

    Tom