locked
How to do SharePoint calculated column due date calculation? RRS feed

  • General discussion

  • Hi All,

    We have a SharePoint 2013 list column 'Expiry Date' and we need to calculate overdue by days. For eg, if expiry date is 1/8/2017 and Overdue by days should be 158. How to achieve this? thanks in advance!

    • Changed type SamDany Thursday, August 4, 2016 8:47 AM
    Thursday, August 4, 2016 7:25 AM

All replies

  • You can achieve this by Calculated column with below formula:

    Column1=Today's Date

    Column2=Expiry Date 

    =DATEDIF([Column1], [Column2],"d")

    Mahi


    Please Mark as answer if found useful :)

    Thursday, August 4, 2016 2:01 PM
  • Calculated column won't be updated daily to show the overdue by days, it'll update only when the item is edited next time. If you want the overdue days to be updated daily, you might need to do this in a workflow. 

    ---
    Rajesh
    rjesh.com| @rjesh
    You don't need to buy me a beer, if helpful just smile, vote, and mark it as answer.

    Thursday, August 4, 2016 2:18 PM
  • Hi Sam,

    This would be complicated to do using workflows or impossible using calculated fields (unless some one edits it every day)  , the best way would be based on whether you just have to show it or email some one based on it.

    If it is display I would just suggest  

    1) XSLT web part which can easily calculate the date difference and show in a table format.  you can use sharepoint designer to do that.

    2) JS link web parts 

    3) Javascripts cleverly developed that can update the field when it is shows (even though i would not recommend it)

    If it is for an email the best way would be to pause multiple workflows (45 day, 15 day etc) even though this may not be that reliable. The most reliable option would be to schedule a power shell script that  do this.


    Thanks & Regards, Balu

    Thursday, August 4, 2016 2:26 PM