I am having an issue when trying to format my date column on a list. I want the background color to turn red if the date is less than or equal to Today – 10 days, else its green.
I cant see how to figure it out.
Here is the JSON:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-
formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": "if(@currentField >= @now + 864000000,'#f7cac9','#f7cac9')"
}
}
I have tried to use Date(@now,toDateString(), but it doesn't work.
