Announcement

Collapse
No announcement yet.

Decimals using datetime formula

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Decimals using datetime formula

    Hi!

    We have the following formula to calculate the number of days it takes to resolve each ticket:

    resolveDays = datetime\diff(resolveDate, createdAt, 'days');

    It works perfect. However, we would like to calculate this value with decimals to be more precise (example: 0.6 days, 1.5 days...).

    Can you help us modifying this formula to obtain decimal days?

    Thanks a lot!



  • #2
    Hello,
    You can try something like this:
    Code:
    resolveDays = number\format(datetime\diff(resolveDate, createdAt, 'hours') / 24, 1);

    Comment


    • #3
      Yes, yes, yes! It works PERFECT! Thanks a lot Maximus

      Merry Christmas!

      Comment


      • #4
        Originally posted by Maximus View Post
        Hello,
        You can try something like this: telldunkin
        Code:
        resolveDays = number\format(datetime\diff(resolveDate, createdAt, 'hours') / 24, 1);
        Exactly what I needed! You just saved me several hours. Thanks!

        Comment

        Working...
        X