Forum Discussion
kobi1991
Jan 11, 2023Copper Contributor
Countdown to due date in SharePoint 365 list
Hello! I'm using a SharePoint 365 list as an action tracker. My list contains the due date. I would like to add a column that contains a count of days remaining to the due date. I tried the ...
- Jan 11, 2023
Hi kobi1991 ,
sure. This is SharePoint Json list formatting code that formats a column.
https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting
Got to you SharePoint View, select the header of your "Due Date" column and select "Column Settings->Format this Column"
Copy the Json Code here
You don't have to change the formula, as "@currentField" references to the selected Column.
Best Regards,
Sven
kobi1991
Jan 11, 2023Copper Contributor
Thank you so much, Sven! It works, but I'm wondering if there's a way to do it the way the 'Countdown' column corresponds to the 'Due date' column as I would like to have a view of the Due date itself, and when adding a new item the 'Countdown' column would populate itself.
Is it at all possible?
Thank you,
Karolina
Is it at all possible?
Thank you,
Karolina
SvenSieverding
Jan 11, 2023Bronze Contributor
Hi kobi1991
You could create a calculated column "Countdown" of type "Date" with the formula
=[Due Date]
and then apply the formatting there.
Then you have two columns with the same value, but one is displaying the date and the other one is displaying the countdown.
Best Regards,
Sven