Feb 17 2023 08:11 AM
Feb 17 2023 09:38 AM
SolutionHi @GeraldT330 ,
The formula is checking if the value of the column is smaller than 15778800000 ms in the future and then paints it orange.
15778800000 ms seconds are
15778800000 ms = 1000 (ms) * 60 (seconds) * 60 (minutes) * 24 (hours) * 182.625 (days)
So if you want just 90 days use
1000 * 60 * 60 * 24 * 90 = 7776000000
That means you just have to exchange 15778800000 with 7776000000 in your formula:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"color": "=if(@currentField <= @now, 'crimson',if(@currentField <= @now + 7776000000 && @currentField > @now,'orange','black'))",
"font-weight": "=if(@currentField <= @now, 'bold',if(@currentField <= @now + 7776000000 && @currentField > @now,'bold','normal'))",
"font-size": "=if(@currentField <= @now, '14px',if(@currentField <= @now + 7776000000 && @currentField > @now,'14px','normal'))"
}
}
Best Regards,
Sven
Feb 17 2023 09:38 AM
SolutionHi @GeraldT330 ,
The formula is checking if the value of the column is smaller than 15778800000 ms in the future and then paints it orange.
15778800000 ms seconds are
15778800000 ms = 1000 (ms) * 60 (seconds) * 60 (minutes) * 24 (hours) * 182.625 (days)
So if you want just 90 days use
1000 * 60 * 60 * 24 * 90 = 7776000000
That means you just have to exchange 15778800000 with 7776000000 in your formula:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"color": "=if(@currentField <= @now, 'crimson',if(@currentField <= @now + 7776000000 && @currentField > @now,'orange','black'))",
"font-weight": "=if(@currentField <= @now, 'bold',if(@currentField <= @now + 7776000000 && @currentField > @now,'bold','normal'))",
"font-size": "=if(@currentField <= @now, '14px',if(@currentField <= @now + 7776000000 && @currentField > @now,'14px','normal'))"
}
}
Best Regards,
Sven