Forum Discussion
SharePoint List - Calculated Field Issue
I'm looking for a way to ensure list items are updated timely, so I created a calculated field with =SUM(TODAY()-Modified). It looks like sometimes it's calculating correctly, but other times it's not.
I also have a field to calculate the number of days since the list item was created, =SUM(TODAY()-Created), which is only sometimes calculating correctly.
Any help is appreciated.
Incorrect calculation:
Correct calculation (even though there is -1, I'm chalking that up to the fact that the modified includes the time and today() does not:
Elizabeth2323 If you want the difference between two dates in "days", you can use formula like this:
=DATEDIF([Column1], [Column2],"d")
For your requirements, try using this:
=DATEDIF(TODAY(),[Created],"d")
Note:
- Sometimes comma( , ) does not work in formula (it is based on language or regional settings on your site). So in that case use semicolon( ; ) instead of comma( , ).
- Use correct display name of your SharePoint columns in above formula.
- Wrap column names inside [] if your column name has space in it. For example: [My Column Name].
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.