I would like to realize the following:
If the date in a column is more than 40 days old, the background should turn orange. If the date is more than 80 days in the past, the background should turn red. Otherwise the background should turn green.
The following code should actually be correct. No errors are displayed. However, all dates that are more than 40 days in the past turn orange. No date turns red or green.
Perhaps someone can help me here.
{
"elmType": "div",
"txtContent": "@currentField",
"style":{
"background-color":
{"operator": "?", "operands":
[
{
"operator": "<=",
"operands":
["@currentField",
{"operator": "-",
"operands": ["@now",4320000000]
}
]
},"#ff8a00",
{
"operator": "<=",
"operands":
["@currentField",
{"operator": "-",
"operands": ["@now",6912000000]
}
]
},"#ff0000",
"#00ff00"
]
}
}
}