JSON Date Formatting Referencing Today Problem

Brass Contributor

I've discovered an issue with trying to apply formatting to SharePoint list data. Simply put I need to exclude today in the formatting application. Basic example is due dates. If the due date is today I don't want to do anything, but if it is yesterday or further back I want to set it to red. Microsoft uses this example on their reference documentation but don't directly note this won't work if the reference date is today. 

 

In this very simple example using "<" or ">=" in the code doesn't return the expected result. My thought is @now is using both date and time so I tried to add in the operator "toLocaleDateString()" but I'm guessing it's not added correctly as I lose all formatting with it included. The use case is for project milestone dates where we want to bring obvious attention to dates in the past but not when it is the current date. Any insight on what I'm missing would be greatly appreciated.

 

Attached are simple examples where it doesn't work as expected with Project02 being the current date - I don't want to have it formatted.2018-12-04_12h15_45.png2018-12-04_12h17_16.png

0 Replies