JSON Column Format to display Todays Date based on Current Status

Copper Contributor

Hi,

 

I have formatted the following JSON so it displays Today´s date only if the status of a task is different than "Completed".

 

I´m planning on comparing that value to the due date in order to determine the difference in days between the 2 columns.

 

However, the results of the JSON displays the date and time and I need the DATE only. Question: What do I need to do in order to retrieve just today´s date without the time information:

 

{
"elmType": "div",
"style": {
"padding": "0 1px"
},
"attributes": {
"class": {
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
{
"operator": "toLowerCase",
"operands": [
"[$Status]"
]
},
{
"operator": "toLowerCase",
"operands": [
"Completed"
]
}
]
},
"@currentField",
{
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
{
"operator": "toLowerCase",
"operands": [
"[$Status]"
]
},
{
"operator": "toLowerCase",
"operands": [
"In progress"
]
}
]
},
"@now",
{
"operator": ":",
"operands": [
{
"operator": "!=",
"operands": [
{
"operator": "toLowerCase",
"operands": [
"@currentField"
]
},
{
"operator": "toLowerCase",
"operands": [
"Completated"
]
}
]
},
"@now",
{
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
{
"operator": "toLowerCase",
"operands": [
"@currentField"
]
},
{
"operator": "toLowerCase",
"operands": [
"Delayed"
]
}
]
},
"@now",
{
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
{
"operator": "toLowerCase",
"operands": [
"@currentField"
]
},
{
"operator": "toLowerCase",
"operands": [
"Waiting on someone else"
]
}
]
},
"@now",
""
]
}
]
}
]
}
]
}
]
}
},
"txtContent": "@now"
}

0 Replies