I have made a few differents options for days pending with SharePoint. I would like to know, how many days a item is open.

First i tried this solution: https://www.solwebsolutions.com/blog/entry/calculate-age-of-sharepoint-list-items I tried this solution, i deleted the today columns. After this, "SharePoint automatically refers "Today" (which has been deleted now) as the today’s date in the formula calculation." but that don't work.

Second option: =DATEVALUE(TEXT(NOW(),"mm/dd/yyyy")) - DATEVALUE(TEXT([Created],"mm/dd/yyyy")) Days since list item was created

Both option dont update the item by them self. Do you know why it don't work? I tested both option on two differents tenants.

Hopefully we can fix this :)

3 Answers 3


The fields in the list view will only be updated when somebody modifies a listitem, so that approach will not work. One option could be to display the items somewhere using a search resultat web part, and in the item display template calculate and show the age of the item


here is a Javascript solution you may want to look into. It's annoying and inconvenient that SharePoint will not update list fields automatically, but rather whenever its been updated manually or with non-OOTB solutions... Let me know if this helps!

Automatically calculate Todays date in SharePoint List

A. Save the following code into a js file(AgeInDays.js).

(function () {
    var overrideCtx = {};
    overrideCtx.Templates = {};
    overrideCtx.Templates.Fields = {        
        "AgeInDays": { "View": ShowAgeInDays}


function ShowAgeInDays(ctx) {
    var created= ctx.CurrentItem.Created;        
    return countDay(created);
function countDay(date){
    var b = new Date(date);
    var e = new Date();
    var dif = e.getTime() - b.getTime();
    var day = Math.floor(dif / (1000 * 60 * 60 * 24));
    return day; 

B. Upload the js file into the Site Assets library.

C. Edit the list view page and add the text below into the JS Link property in the web part editor.

  • Do we need to created AgeInDays column as a number datatype for this Commented Jun 24, 2020 at 11:51

I used this method, flow.


The flow runs perfect. It was 5 mins work to solve this with flow. Hopefully someone will use this option too.

  • Doesn't it causes havoc in the version history ? Commented Aug 3, 2018 at 11:10

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.