2

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!

1

Try to add this formula to your calculated field to show diff between two dates as days.

=DATEDIF([Current Date], [Enddate],"d")

Note : [Today] does not work in calculated field as explained here: How to use Today and Me in Calculated column

  • I am also here if you need any clarification – Mohamed El-Qassas MVP Aug 4 '16 at 8:08
  • Good reference to here But your temporarily DateTime column has the exact same issue It will not update unless the Item is updated or the Field definition is updated So if you do nothing and wait 24 hours.. the DateTime value is yesterday – Danny '365CSI' Engelman Aug 4 '16 at 8:15
  • Dear @Danny I agree with you but I tried to answer based on the question requirement but there's more solution regarding that but depend on the questioner experience so I typed I am also here if you need any clarification at every answer , have good day danny :) – Mohamed El-Qassas MVP Aug 4 '16 at 8:24
  • Your DATEDIF answer is 100% correct, your suggested workaround does not work for the same reason why [TODAY] does not work. – Danny '365CSI' Engelman Aug 4 '16 at 8:38
  • I have already mentioned this in Note : section, also I see someone suggest the same workaround based on MSDN Microsoft at last section blogs.msdn.microsoft.com/cjohnson/2006/03/15/… anyway we only have the same aim to help the questioner and really i appreciate your comments :) – Mohamed El-Qassas MVP Aug 4 '16 at 8:49
0

You can add jslink on the view. Inside JS link, calculate the number of days from today to get the required value. As JSlink executes on page load, it will always show updated value based on today.

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.