Forum Discussion
SharePoint List 'Calendar View' - hide if time 00:00
I must be missing something as none of these json column formats are working...
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "span",
"txtContent": "=if(indexOf(toString([@currentField]), '00:00') != -1, [@currentField], toLocaleDateString([@currentField]))"
}
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "span",
"txtContent": "=if(getHours([@currentField]) == 0 && getMinutes([@currentField]) == 0, [@currentField], toLocaleDateString([@currentField]))"
}
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "span",
"txtContent": "=if(formatDateTime([@currentField], 'HH:mm') == '00:00', [@currentField], toLocaleDateString([@currentField]))"
}
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "span",
"txtContent": "=if(indexOf(toISOString([@currentField]), 'T00:00:00') != -1, [@currentField], toLocaleDateString([@currentField]))"
}