SOLVED

Quick JSON formula question regarding date plus 365

%3CLINGO-SUB%20id%3D%22lingo-sub-1298301%22%20slang%3D%22en-US%22%3EQuick%20JSON%20formula%20question%20regarding%20date%20plus%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1298301%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20format%20a%20column%20to%20change%20color%20if%20TODAY%20is%20greater%20than%20the%20date%20entered%2C%20plus%20365%20days.%20It's%20basically%20to%20show%20a%20color%20for%20expiration%20of%20date%20entered.%20Below%20is%20what%20I%20was%20trying%20to%20figure%20out%2C%20but%20this%20doesn't%20work.%20Thanks!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%7B%0A%20%20%22schema%22%3A%20%22https%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fview-formatting.schema.json%22%2C%0A%20%20%20%22additionalRowClass%22%3A%20%22%3Dif(%40now()%2B365%20%26gt%3B%20%5B%24COLUMN_x0020_NAME%5D%2C%20'sp-field-severity--severeWarning'%2C%20'')%22%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1298301%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1302560%22%20slang%3D%22en-US%22%3ERe%3A%20Quick%20JSON%20formula%20question%20regarding%20date%20plus%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1302560%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F495200%22%20target%3D%22_blank%22%3E%40alandarr%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIs%20this%20what%20you%20are%20looking%20for%3F%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Annotation%202020-04-13%20093346.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F183937i195D254EEAA2448E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Annotation%202020-04-13%20093346.png%22%20alt%3D%22Annotation%202020-04-13%20093346.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%7B%3CBR%20%2F%3E%22%24schema%22%3A%20%22%3CA%20href%3D%22https%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fcolumn-formatting.schema.json%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fcolumn-formatting.schema.json%3C%2FA%3E%22%2C%3CBR%20%2F%3E%22elmType%22%3A%20%22div%22%2C%3CBR%20%2F%3E%22txtContent%22%3A%20%22%40currentField%22%2C%3CBR%20%2F%3E%22attributes%22%3A%20%7B%3CBR%20%2F%3E%22class%22%3A%20%22%3Dif(%5B%24DateColumn%5D%20%26gt%3B%3D%20%40now%20%2B%20365%2C%20'ms-fontColor-themePrimary%20ms-fontWeight-bold'%2C%20'')%22%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20hope%20this%20helps.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENorm%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1303583%22%20slang%3D%22en-US%22%3ERe%3A%20Quick%20JSON%20formula%20question%20regarding%20date%20plus%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1303583%22%20slang%3D%22en-US%22%3EYes%20that%20works!%20I%20was%20originally%20wanting%20the%20background%20to%20change%2C%20but%20changing%20the%20text%20works%20great.%20Many%20thanks%20for%20your%20help!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1303640%22%20slang%3D%22en-US%22%3ERe%3A%20Quick%20JSON%20formula%20question%20regarding%20date%20plus%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1303640%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F495200%22%20target%3D%22_blank%22%3E%40alandarr%3C%2FA%3E%2C%20glad%20it%20worked.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENorm%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1304026%22%20slang%3D%22en-US%22%3ERe%3A%20Quick%20JSON%20formula%20question%20regarding%20date%20plus%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1304026%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F111382%22%20target%3D%22_blank%22%3E%40Norman%20Young%3C%2FA%3E%26nbsp%3BTaking%20another%20look%20at%20that%2C%20it%20still%20isn't%20working%20correctly.%20I'm%20trying%20to%20color%20it%20if%20it%20is%20more%20than%20365%20days%20old%20from%20today%2C%20i.e.%20more%20than%20a%20year%20old.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20tried%20to%20move%20the%20formula%20around%2C%20but%20I%20still%20can't%20get%20it%20to%20do%20that.%20Not%20sure%20what's%20going%20on%20LOL!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1304099%22%20slang%3D%22en-US%22%3ERe%3A%20Quick%20JSON%20formula%20question%20regarding%20date%20plus%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1304099%22%20slang%3D%22en-US%22%3EShare%20your%20code%20and%20what%20is%20the%20column%20name%20(internal)%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1305375%22%20slang%3D%22en-US%22%3ERe%3A%20Quick%20JSON%20formula%20question%20regarding%20date%20plus%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1305375%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F111382%22%20target%3D%22_blank%22%3E%40Norman%20Young%3C%2FA%3E%26nbsp%3BThe%20code%20works%2C%20but%20your%20example%20date%20is%20in%20the%20future.%20What%20I%20am%20trying%20to%20do%20is%20color%20the%20text%20when%20the%20date%20is%20past%20one%20year%20old.%20The%20attached%20example%20(screenshot)%20is%20your%20code%20with%20a%20date%20that%20is%20over%20365%20days%20in%20the%20past.%20The%20text%20is%20unchanged.%20It%20seems%20simple%20enough%2C%20but%20I've%20struggled%20with%20it%20for%20a%20couple%20days%20before%20you%20took%20a%20crack%20at%20it.%20Makes%20me%20crazy!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screen%20Shot%202020-04-14%20at%207.57.13%20AM.png%22%20style%3D%22width%3A%20739px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F184232i1D4D4F0326A3A158%2Fimage-dimensions%2F739x207%3Fv%3D1.0%22%20width%3D%22739%22%20height%3D%22207%22%20title%3D%22Screen%20Shot%202020-04-14%20at%207.57.13%20AM.png%22%20alt%3D%22Screen%20Shot%202020-04-14%20at%207.57.13%20AM.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E2%80%83%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20move%20the%20items%20around%2C%20a%20date%20that%20is%20less%20than%20a%20year%20old%20still%20shows%20as%20colored%20and%20bold.%20It's%20only%20supposed%20to%20do%20that%20if%20it's%20more%20than%20a%20year%20old.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%7B%0A%22%24schema%22%3A%20%22https%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fcolumn-formatting.schema.json%22%2C%0A%22elmType%22%3A%20%22div%22%2C%0A%22txtContent%22%3A%20%22%40currentField%22%2C%0A%22attributes%22%3A%20%7B%0A%22class%22%3A%20%22%3Dif(%40now%20%26gt%3B%3D%20%5B%24Expiration%5D%20%2B%20365%2C%20'ms-fontColor-themePrimary%20ms-fontWeight-bold'%2C%20'')%22%0A%7D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1305666%22%20slang%3D%22en-US%22%3ERe%3A%20Quick%20JSON%20formula%20question%20regarding%20date%20plus%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1305666%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F111382%22%20target%3D%22_blank%22%3E%40Norman%20Young%3C%2FA%3E%26nbsp%3BThe%20code%20works%2C%20but%20your%20example%20date%20is%20in%20the%20future.%20What%20I%20am%20trying%20to%20do%20is%20color%20the%20text%20when%20the%20date%20is%20past%20one%20year%20old.%20The%20attached%20example%20(screenshot)%20is%20your%20code%20with%20a%20date%20that%20is%20over%20365%20days%20in%20the%20past.%20The%20text%20is%20unchanged.%20It%20seems%20simple%20enough%2C%20but%20I've%20struggled%20with%20it%20for%20a%20couple%20days%20before%20you%20took%20a%20crack%20at%20it.%20Makes%20me%20crazy!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screen%20Shot%202020-04-14%20at%207.57.13%20AM.png%22%20style%3D%22width%3A%20739px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F184232i1D4D4F0326A3A158%2Fimage-dimensions%2F739x207%3Fv%3D1.0%22%20width%3D%22739%22%20height%3D%22207%22%20title%3D%22Screen%20Shot%202020-04-14%20at%207.57.13%20AM.png%22%20alt%3D%22Screen%20Shot%202020-04-14%20at%207.57.13%20AM.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E2%80%83%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20move%20the%20items%20around%2C%20a%20date%20that%20is%20less%20than%20a%20year%20old%20still%20shows%20as%20colored%20and%20bold.%20It's%20only%20supposed%20to%20do%20that%20if%20it's%20more%20than%20a%20year%20old.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%7B%0A%22%24schema%22%3A%20%22https%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fcolumn-formatting.schema.json%22%2C%0A%22elmType%22%3A%20%22div%22%2C%0A%22txtContent%22%3A%20%22%40currentField%22%2C%0A%22attributes%22%3A%20%7B%0A%22class%22%3A%20%22%3Dif(%40now%20%26gt%3B%3D%20%5B%24Expiration%5D%20%2B%20365%2C%20'ms-fontColor-themePrimary%20ms-fontWeight-bold'%2C%20'')%22%0A%7D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1307015%22%20slang%3D%22en-US%22%3ERe%3A%20Quick%20JSON%20formula%20question%20regarding%20date%20plus%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1307015%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F495200%22%20target%3D%22_blank%22%3E%40alandarr%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETry%20this%3A%3C%2FP%3E%0A%3CPRE%3E%7B%3CBR%20%2F%3E%22%24schema%22%3A%20%22https%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fcolumn-formatting.schema.json%22%2C%3CBR%20%2F%3E%22elmType%22%3A%20%22div%22%2C%3CBR%20%2F%3E%22txtContent%22%3A%20%22%40currentField%22%2C%3CBR%20%2F%3E%22attributes%22%3A%20%7B%3CBR%20%2F%3E%22class%22%3A%20%22%3Dif(floor((Number(%40now)-Number(%5B%24DateColumn%5D))%2F(1000*60*60*24*365))%20%26gt%3B%200%2C%20'ms-fontColor-themePrimary%20ms-fontWeight-bold'%2C%20'')%22%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Annotation%202020-04-14%20154757.png%22%20style%3D%22width%3A%20266px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F184366i61BC88491E5247A8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Annotation%202020-04-14%20154757.png%22%20alt%3D%22Annotation%202020-04-14%20154757.png%22%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1309339%22%20slang%3D%22en-US%22%3ERe%3A%20Quick%20JSON%20formula%20question%20regarding%20date%20plus%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1309339%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F111382%22%20target%3D%22_blank%22%3E%40Norman%20Young%3C%2FA%3E%26nbsp%3BThat%20works!%20I%20knew%20it%20had%20to%20be%20more%20complicated%20than%20what%20I%20was%20trying.%20Can%20I%20buy%20you%20a%20cup%20of%20coffee%3F%20Thank%20you%20so%20very%20much%20with%20helping.%20I'm%20new%20to%20Sharepoint%20and%20feel%20a%20bit%20overwhelmed.%20Thanks%20again!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%2C%20if%20I%20can%20figure%20out%20how%20to%20mark%20this%20answer%20as%20correct%20instead%20of%20the%20other%20one...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1309383%22%20slang%3D%22en-US%22%3ERe%3A%20Quick%20JSON%20formula%20question%20regarding%20date%20plus%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1309383%22%20slang%3D%22en-US%22%3E%3CP%3EI%20appreciate%20the%20coffee%20offer%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F495200%22%20target%3D%22_blank%22%3E%40alandarr%3C%2FA%3E%20but%20it%20is%20unnecessary.%20I'm%20glad%20things%20worked%20out.%20Reach%20out%20again%20if%20you%20get%20stuck.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENorm%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

I am trying to format a column to change color if TODAY is greater than the date entered, plus 365 days. It's basically to show a color for expiration of date entered. Below is what I was trying to figure out, but this doesn't work. Thanks!

 

 

{
  "schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
   "additionalRowClass": "=if(@now()+365 > [$COLUMN_x0020_NAME], 'sp-field-severity--severeWarning', '')"
}

 

 

 

 

 

 

 

10 Replies
Highlighted
Best Response confirmed by alandarr (Contributor)
Solution

@alandarr 

 

Is this what you are looking for?

Annotation 2020-04-13 093346.png

 

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"attributes": {
"class": "=if([$DateColumn] >= @now + 365, 'ms-fontColor-themePrimary ms-fontWeight-bold', '')"
}
}

 

I hope this helps.

 

Norm

Highlighted
Yes that works! I was originally wanting the background to change, but changing the text works great. Many thanks for your help!
Highlighted

Hi @alandarr, glad it worked.

 

Norm

Highlighted

@Norman Young Taking another look at that, it still isn't working correctly. I'm trying to color it if it is more than 365 days old from today, i.e. more than a year old.

 

I've tried to move the formula around, but I still can't get it to do that. Not sure what's going on LOL!

Highlighted
Share your code and what is the column name (internal)?
Highlighted

@Norman Young The code works, but your example date is in the future. What I am trying to do is color the text when the date is past one year old. The attached example (screenshot) is your code with a date that is over 365 days in the past. The text is unchanged. It seems simple enough, but I've struggled with it for a couple days before you took a crack at it. Makes me crazy!

 

Screen Shot 2020-04-14 at 7.57.13 AM.png

 

If you move the items around, a date that is less than a year old still shows as colored and bold. It's only supposed to do that if it's more than a year old.

 

 

 

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"attributes": {
"class": "=if(@now >= [$Expiration] + 365, 'ms-fontColor-themePrimary ms-fontWeight-bold', '')"
}
}

 

 

 

Highlighted

@Norman Young The code works, but your example date is in the future. What I am trying to do is color the text when the date is past one year old. The attached example (screenshot) is your code with a date that is over 365 days in the past. The text is unchanged. It seems simple enough, but I've struggled with it for a couple days before you took a crack at it. Makes me crazy!

 

Screen Shot 2020-04-14 at 7.57.13 AM.png

 

If you move the items around, a date that is less than a year old still shows as colored and bold. It's only supposed to do that if it's more than a year old.

 

 

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"attributes": {
"class": "=if(@now >= [$Expiration] + 365, 'ms-fontColor-themePrimary ms-fontWeight-bold', '')"
}
}

 

 

Highlighted

Hi @alandarr,

 

Try this:

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"attributes": {
"class": "=if(floor((Number(@now)-Number([$DateColumn]))/(1000*60*60*24*365)) > 0, 'ms-fontColor-themePrimary ms-fontWeight-bold', '')"
}
}

Annotation 2020-04-14 154757.png 

Highlighted

@Norman Young That works! I knew it had to be more complicated than what I was trying. Can I buy you a cup of coffee? Thank you so very much with helping. I'm new to Sharepoint and feel a bit overwhelmed. Thanks again!

 

Now, if I can figure out how to mark this answer as correct instead of the other one...

Highlighted

I appreciate the coffee offer @alandarr but it is unnecessary. I'm glad things worked out. Reach out again if you get stuck.

 

Norm