Question

I am working on a custom list inside a SharePoint online site collection. and i have a custom column named "Last Update" of type DateTime, and i want to create a calculated column to show the differences between today and the "Last Update" site column.

So i created a new site column of type Calculated column, with the following formula:-

enter image description here

and it worked well, but when i tried to add this column inside our list, i got this error:-

enter image description here

any advice?

Was it helpful?

Solution

Use below formula to calculate the difference between Today and Last Update Date column.

=IF(ISBLANK([Last Update]),"",(TEXT(NOW(),"mm/dd/yyyy")-[Last Update]))

and set The data type returned from this formula to : Number in order to get difference in Number of days between two dates.

OTHER TIPS

We simply cannot use [Today] or [Me] in calculated columns. Use formulas like

=DATEVALUE(TEXT(NOW(),"mm/dd/yyyy")) - DATEVALUE(TEXT([Created],"mm/dd/yyyy"))

or =TEXT(NOW(),"mm/dd/yyyy")-[Created] will be workarounds you can use. And remember if you use DateValue function, you need to set the The data type returned from this formula is: to be date.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top