如何在不使用计算列的情况下执行此操作? 可以使用JSON吗?
关于, 艾里奥·费尔南德斯(Elio Fernandes)
答案 0 :(得分:0)
尝试在“小时”字段中使用以下JSON代码:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": {
"operator": "+",
"operands": [
"=substring(@currentField,0,2)",
":",
"=substring(@currentField,2,4)"
]
}
}
对于数字列,请更改为:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": {
"operator": "+",
"operands": [
"=substring(toString(@currentField),0,2)",
":",
"=substring(toString(@currentField),2,4)"
]
}
}