I want to condition is the current date is 16th or 17th of month using expression. This is having syntax error. Can anyone help me create a expression if current date is some specific date i want to check
`{
"and": [
{
"or":[
"equals": [
"2024-07-16",
"@formatDateTime(utcNow(), 'yyyy-MM-dd')"
],
"equals": [
"2024-07-17",
"@formatDateTime(utcNow(), 'yyyy-MM-dd')"
]
]
}
]
}`
New contributor
Lalitha Krishnamurthy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
It seems you have mixed up square and curly brackets somewhere…
Here, check this out:
{
"and": [
{
"or": [
{
"equals": [
"@formatDateTime(utcNow(), 'yyyy-MM-dd')",
"2024-07-16"
]
},
{
"equals": [
"@formatDateTime(utcNow(), 'yyyy-MM-dd')",
"2024-07-17"
]
}
]
}
]
}
But I think this expression could be used for checking if the current date is the 16th or 17th of the month:
{
"and": [
{
"or": [
{
"equals": [
"@dayOfMonth(utcNow())",
16
]
},
{
"equals": [
"@dayOfMonth(utcNow())",
17
]
}
]
}
]
}