Forum Discussion
Create an 'Age/Days old' column in SharePoint List
- Feb 17, 2020
Hi Norman Young
The Number function of @now (& date fields) returns the value in milliseconds.
The value 86,400,000 represents 1 day in milliseconds
( 1000 x 60 x 60 x 24 )
Yes, by removing the /365 your result will be in days
For month result, you will have have to replace /365 with /30 (this will not be 100% accurate result due different number of days in a month)
=IF(ISBLANK([Date reported]), 0,(DATEDIF([Date reported],TODAY(),"d")))
If anyone jumps on here and is displaying both the date and a count for how many days have gone by (in my case, how old a post is: 2 days, 17 days, etc.). You'll want to identify your own Column and this takes into account the case that the identified date column has not been filled in (will display 0).
- ivorycassiopeiaMay 17, 2023Copper ContributorO.M.G. - thank you so much for this!!! I have been searching all over for this and finally found your post!!!
- stevenfilanowiczOct 18, 2023Copper Contributor
DEC_Studio This is great! two questions, will this auto update each year? Second question, do you happen to know how to add an extra format to this? I would love to be able to have it highlight Red once the Age column reached a certain point.
What I tried to do, was alter your formula to get just Days old, and removed years and months, but that doesn't work if I wind up going past 30 days old. My plan with that was to find some Formatting forumla to make it go red if the item was 90 days aged.Going back to your formula where I have years, months, Days is great, but ideally if there was a way to still have it format red once it hits 3 months?
Thanks so much!
- CommonSenseBruhJun 05, 2022Copper ContributorWorked like a charm for me! Thanks