Forum Discussion

FSomers's avatar
FSomers
Brass Contributor
Jan 26, 2023
Solved

Date/Time column displays seconds if I apply JSON inlineEditField formatting

Hello,    I have two date/time columns. They must continue to display as below:  Due to OPO internal name is DuetoOPO Requestor Due date internal name is DueDate   We would like to use in...
  • Don Kirkham's avatar
    Jan 27, 2023

    FSomers 

    Try the following, which works in my testing. Different countries may have different results.

     

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
      "elmType": "div",
      "inlineEditField": "@currentField",
      "txtContent": "@currentField"
    }

     

    If that does not work for you, we can manually build a formatted date/time string.

    Good luck!
    Don

    If my answer helps solve or resolve your issue, please consider clicking Mark as Best Response & Like. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it a Like.