-1

I am trying to format the date from 10/30/2020 to Oct 30, 2020 using the SharePoint online column formatting. Can someone please help me out with JSON format which convert my date to any specific format which was passed as a parameter.

Thanks in Advance.

1 Answers1

0

@Dinesh Talekar,

Please take a reference of below JSON code:

{
    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
    "elmType": "div",
    "txtContent": "=if(getMonth(@currentField)==0, 'Jan', if(getMonth(@currentField)==1, 'Feb', if(getMonth(@currentField)==2, 'Mar', if(getMonth(@currentField)==3, 'Apr', if(getMonth(@currentField)==4, 'May', if(getMonth(@currentField)==5, 'Jun', if(getMonth(@currentField)==6, 'Jul', if(getMonth(@currentField)==7, 'Aug', if(getMonth(@currentField)==8, 'Sep', if(getMonth(@currentField)==9, 'Oct', if(getMonth(@currentField)==10, 'Nov', 'Dec')))))))))))+ ' '+getDate(@currentField)+','+ getYear(@currentField)",
    "style": {
        "color": "#ff0000"
    }
}

Test Result:

enter image description here

BR

Baker_Kong
  • 1,739
  • 1
  • 4
  • 9