Support Questions
Find answers, ask questions, and share your expertise

How to get ISO string in Nifi getMongo Query Field

How to get ISO string in Nifi getMongo Query Field

New Contributor

I'm trying to use expression languge to generate ISO string in Nifi getMongo Query field using following query,

{
"remindmeDate": {
"$gte": "${now():format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",'GMT')}",
"$lte": "${now():toNumber():plus(359999):format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",'GMT')}"
}
}

But i'm getting invalid JSON error error as double quotes are not escaped. When we try to escape it using \ operator, nifi is not evaluating the expression language. Is there any method or workaround to get this working ?

Thanks in advance