SOLVED

JSON formatting date column

%3CLINGO-SUB%20id%3D%22lingo-sub-1967078%22%20slang%3D%22en-US%22%3EJSON%20formatting%20date%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1967078%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%20I%20am%20trying%20to%20understand%20how%20to%20use%20the%20column%20formatting%20(highlighting)%20for%20dates.%20My%20goal%20is%20the%20following%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EColumn%20Name%3A%3C%2FSTRONG%3E%20Internal%20Due%20Date%3C%2FP%3E%3CP%3EI%20would%20like%20the%20field%20to%20be%20%3CFONT%20color%3D%22%23008000%22%3E%3CSTRONG%3Egreen%3C%2FSTRONG%3E%3C%2FFONT%3E%20if%20the%20date%20is%20%26gt%3B%20today%20%2B%2045%20days%3C%2FP%3E%3CP%3EI%20would%20like%20the%20field%20to%20be%20%3CFONT%20color%3D%22%23FF6600%22%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23FFCC00%22%3Eyellow%3C%2FFONT%3E%26nbsp%3B%3C%2FSTRONG%3E%3CFONT%20color%3D%22%23000000%22%3Eif%20the%20date%20is%20%26gt%3B%20today%20%2B%2030%20days%2C%20and%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23FF6600%22%3E%3CFONT%20color%3D%22%23000000%22%3EI%20would%20like%20the%20field%20to%20be%20%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3Ered%3C%2FSTRONG%3E%3C%2FFONT%3E%20if%20the%20date%20is%20%26gt%3B%20today%20%2B%2020%20days.%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3EIt%20would%20be%20great%20if%20there%20was%20a%20statement%20that%20I%20could%20make%20for%20all%20of%20these%20in%20one%2C%20but%20I%20think%20that%20I%20may%20have%20to%20create%20a%20column%20for%20each%20color.%20I%20don't%20know.%20I%20can't%20locate%20an%20answer%20anywhere.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20someone%20assist%20me%20with%20the%20best%20avenue%20to%20take%20to%20get%20this%20accomplished.%20Also%2C%20it%20seems%20like%20there%20might%20have%20to%20be%20a%20%22between%22%20in%20there%20somewhere.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20any%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1967078%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1971438%22%20slang%3D%22en-US%22%3ERe%3A%20JSON%20formatting%20date%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1971438%22%20slang%3D%22en-US%22%3EI%20did%20figure%20this%20out.%20I%20modified%20this%20response%20for%20my%20situation.%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fanswers%2Fquestions%2F143256%2Fjson-dates-greenyellowred.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fanswers%2Fquestions%2F143256%2Fjson-dates-greenyellowred.html%3C%2FA%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi all, I am trying to understand how to use the column formatting (highlighting) for dates. My goal is the following: 

Column Name: Internal Due Date

I would like the field to be green if the date is > today + 45 days

I would like the field to be yellow if the date is > today + 30 days, and

I would like the field to be red if the date is > today + 20 days.

It would be great if there was a statement that I could make for all of these in one, but I think that I may have to create a column for each color. I don't know. I can't locate an answer anywhere.

 

Can someone assist me with the best avenue to take to get this accomplished. Also, it seems like there might have to be a "between" in there somewhere.

 

Thanks for any help.

1 Reply
Best Response confirmed by Jamie Johnson (New Contributor)
Solution
I did figure this out. I modified this response for my situation. https://docs.microsoft.com/en-us/answers/questions/143256/json-dates-greenyellowred.html