Forum Discussion
Update date field to todays date in a list
- Nov 10, 2023
JSON Formatting way:
You can use either of below SharePoint JSON column formatting for your modified column:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField" }
OR
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "=toLocaleDateString(@currentField)" }
Note: When using toLocaleDateString() operator, results vary based on user's locale.
You can find the steps to apply JSON column formatting at: Use column formatting to customize SharePoint
Please click Mark as Best Response & Like if my post helped you to solve your issue. 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 Like.
JSON Formatting way:
You can use either of below SharePoint JSON column formatting for your modified column:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField"
}
OR
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=toLocaleDateString(@currentField)"
}
Note: When using toLocaleDateString() operator, results vary based on user's locale.
You can find the steps to apply JSON column formatting at: Use column formatting to customize SharePoint
Please click Mark as Best Response & Like if my post helped you to solve your issue. 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 Like.