Display column in local date format using JSON list view formatting

%3CLINGO-SUB%20id%3D%22lingo-sub-1580202%22%20slang%3D%22en-US%22%3EDisplay%20column%20in%20local%20date%20format%20using%20JSON%20list%20view%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1580202%22%20slang%3D%22en-US%22%3E%3CP%3EI've%20just%20noticed%20that%20using%20toLocaleDateString(%5B%24Modified%5D)%20to%20display%20a%20date%20column%20in%20local%20format%20i.e.%20DD%2FMM%2FYYYY%20only%20works%20for%20column%20formatting%2C%20and%20seems%20to%20be%20completely%20ignored%20when%20using%20list%20view%20formatting.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20know%20a%20way%20to%20display%20a%20date%20column%20in%20the%20format%20DD%2FMM%2FYYYY%20via%20JSON%20list%20view%20formatting%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20tried%20using%20a%20calculated%20column%2C%20but%20I%20am%20having%20trouble%20displaying%20the%20contents%20of%20a%20calculated%20column%20using%20JSON%20list%20view%20formatting%20also.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20someone%20can%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1580202%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EJson%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Elist%20view%20formatting%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1580219%22%20slang%3D%22en-US%22%3ERe%3A%20Display%20column%20in%20local%20date%20format%20using%20JSON%20list%20view%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1580219%22%20slang%3D%22en-US%22%3E%3CP%3EJust%20a%20quick%20update%20-%20a%20little%20gotcha%20that%20trips%20me%20up%20often%20is%20that%20if%20you%20want%20to%20display%20the%20contents%20of%20a%20column%20using%20list%20view%20formatting%2C%20you%20still%20need%20that%20column%20to%20be%20'visible'%20in%20the%20view%20itself.%20Otherwise%2C%20it%20will%20just%20not%20appear.%20I've%20now%20got%20the%20calculated%20column%20appearing%20and%20the%20date%20format%20is%20DD%2FMM%2FYYYY%20-%20basically%20I%20just%20forgot%20to%20set%20the%20calculated%20column%20to%20visible%20in%20the%20view%20itself.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%26nbsp%3B%3CSPAN%3EtoLocaleDateString()%20function%20still%20does%20nothing%20though%20so%20the%20question%20is%20still%20unanswered%20on%20that%20front.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

I've just noticed that using toLocaleDateString([$Modified]) to display a date column in local format i.e. DD/MM/YYYY only works for column formatting, and seems to be completely ignored when using list view formatting.

 

Does anyone know a way to display a date column in the format DD/MM/YYYY via JSON list view formatting?

 

I've tried using a calculated column, but I am having trouble displaying the contents of a calculated column using JSON list view formatting also.

 

Hope someone can help.

1 Reply

Just a quick update - a little gotcha that trips me up often is that if you want to display the contents of a column using list view formatting, you still need that column to be 'visible' in the view itself. Otherwise, it will just not appear. I've now got the calculated column appearing and the date format is DD/MM/YYYY - basically I just forgot to set the calculated column to visible in the view itself. 

 

The toLocaleDateString() function still does nothing though so the question is still unanswered on that front.