Formatting column values
Column formatting enables dozens of operators to manipulate column values. In this section, I’ll present the most common use cases.
Formatting dates and times
Column formatting includes several formulas for formatting dates and times.
"txtContent":"=Date(@currentField)"
returns date and time formatted like 11/23/2023, 01:15:00 AM."txtContent":"=toDateString(@currentField)"
returns only the date formatted like Thu Nov 23 2023. This presentation does not vary based on user’s locale.ToLocaleDateString
returns the date formatted like 11/23/2023. AndtoLocaleTimeString
return the time formatted like 1:15:00 AM. These values are localized based on user’s locale. For example, for Finnish user, these values are displayed as.
Sometimes returning just a day, month, or year is required, and these can be achieved using getDate
, getMonth
, or getYear
operators. For example, showing...