I know I've read that dates and time don't do well in lists. Does anyone know a workaround to create a calculated column that will bump the number up in the column by 1 every 24 hours. So the column is titled # of days post-op and it will equal 0 on the first day, after 24 hours it should equal 1, etc.

2 Answers 2


The problem is that calculated columns don't recalculate until an item is modified. So if nobody edits an item for 3 days after post-op, your calculated column will still show 0. You have 2 options within SharePoint: either show the op date and let your users calculate it in their heads, or create views that filter into 0-1 days post-op, 1-2 days post-op, etc. Another solution would be to do the calculations with JavaScript, although you'll need to do some customizing. Here is one blog with example Javascript. Here is another. Let me know if you want to go down the JavaScript route and run into problems; I'd be happy to discuss.


As Aron mentioned if you wanted it to automatically update you'll need to configure something to periodically update the values.

Some options:

  1. A SharePoint Timer Job that runs once a day to update the column.
  2. A PowerShell script to update the column that runs once a day via the Windows Scheduler.

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.