How to change SharePoint 2019 on premise "Date and Time" column format by using JSON in Modern Page

SHUO .H 706 Reputation points
2021-08-27T16:09:19.727+00:00

Hi there,

I have "Date and Time" Column and the value is "8/31/2021". If I would like to change the format from "8/31/2021" to "2021/8/31", how should I do by using JSON.

Thanks

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,221 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,668 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,573 questions
0 comments No comments
{count} votes

Accepted answer
  1. Allen Xu_MSFT 13,776 Reputation points
    2021-08-30T02:16:29.33+00:00

    Hi @SHUO .H ,

    Unfortunately, it is not currently possible to apply custom string formats or to extract portions of dates using JSON column formatting.

    However, you are able to do this with standard calculated columns:

    =TEXT([YourField],"yyyy/mm/dd")  
    

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful