JSON formatting to display the exact date and time of creation.

Michal Rama 40 Reputation points
2025-08-04T10:17:20.3466667+00:00

Hello,

We would need to change the formatting to show the exact time and date of creation.

2025-08-04 12 09 25

This could be solved using JSON formatting, but I don't know exactly what to write.

I tried using ChatGPT, but I didn't get a working solution (the code below shows this)

2025-08-04 12 15 13

Please help

Thank you

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "style": {
    "box-sizing": "border-box",
    "padding": "0 2px",
    "overflow": "hidden",
    "text-overflow": "ellipsis"
  },
  "children": [
    {
      "elmType": "span",
      "style": {
        "overflow": "hidden",
        "text-overflow": "ellipsis",
        "padding": "0 3px"
      },
      "txtContent": "=formatDateTime([$Created], \"dd.MM.yyyy HH:mm:ss\")",
      "attributes": {
        "class": "sp-field-fontSizeSmall sp-css-color-LightGrayFont"
      }
    }
  ]
}

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

Accepted answer
  1. Jayden-P 5,655 Reputation points Microsoft External Staff Moderator
    2025-08-04T11:11:49.4033333+00:00

    Hi @Michal Rama

    Thank you for posting your question in the Microsoft Q&A forum. 

    To assist you better, I will need more information.

    Do you want to show the full MM/DD/YYYY and the time like the picture below?

    If yes, you just need to turn on "Include Time".

    Or do you want to use JSON to format the column?

    Please provide more information so I can assist you better.User's image


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.