0

I am trying to get a JSON script that will colour/highlight the entries in a date column that are within the next 2 months(or already passed).

What I have at the moment is :

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "@currentField",
  "style": {
    "color": {
      "operator": "?",
      "operands": [
        {
          "operator": ">=",
          "operands": [
            "@currentField",
            {
              "operator": "-",
              "operands": [
                "@now",
                52704000000
              ]
            }
          ]
        },
        "#ff0000",
        ""
      ]
    }
  }
}

What have I missed?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.