question

SHUOH-8693 avatar image
0 Votes"
SHUOH-8693 asked AllenXu-MSFT answered

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

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-devoffice-sharepoint-server-developmentoffice-sharepoint-server-customizationoffice-sharepoint-server-itpro
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AllenXu-MSFT avatar image
0 Votes"
AllenXu-MSFT answered

Hi @SHUOH-8693 ,

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.