0

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), 
           ((Number(Date(@now)))/86400000-
                     (Number([$Date_x0020_Opened]))/86400000), 
           ((Number([$Date_x0020_Closed]))/86400000-
                     (Number([$Date_x0020_Opened]))/86400000))"
}

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

0

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 '18 at 13:57
  • That would be a issue, you may use Flow sharepointlibrarian.com/2017/12/08/… – Lee_MSFT Nov 20 '18 at 1:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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