I needed to show the day the item is in open status. The days are only displayed in allitem.aspx. I was able to use JSLink to achieve it in classic UI. When the user switches to Modern UI, JSLink does not work, I modified it to Json to see if it works.

    "elmType": "div",
    "txtContent": "=if((Number([$Date_x0020_Closed]) == 0), 

This gives me the values in decimal. How do I convert it to total days without decimal.

1 Answer 1


You could create a calculate column set return type as Number with 0 decimal.

Sample formula: =NOW()-[Date Opened]

  • Hi, Thank you for the update. I thought the calculated column gets updated only when the item is updated. Does the value changes everyday even if the list item is not updated/modified?
    – Thisisme..
    Nov 19, 2018 at 13:57
  • That would be a issue, you may use Flow sharepointlibrarian.com/2017/12/08/…
    – Lee
    Nov 20, 2018 at 1:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.