Forum Discussion
chudson002
Jul 18, 2020Brass Contributor
CONDITIONAL FORMATTING OF DATE COLUMN
Hello Community, Have a column with a date. When I apply conditional formatting, the time pops into the column 12:00:00 AM. How can this be removed? Thanks.
RobElliott
Jul 19, 2020Silver Contributor
Hi chudson002 using the built-in formatting I don't know of a way to remove the time. But by going to advanced mode you can add your own JSON for conditional formatting on the date column. For example:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"padding-left": "14px",
"background-color": "=if(@currentField <= @now, '#c00000','teal')",
"color": "white"
}
}
will give the following result:
Rob
Los Gallardos
Microsoft Power Automate Community Super User