it works .. Interesting, never knew those existed
const expression = '$moment().format("YYYY-MM-DD HH:mm:ss")';
let exp = RED.util.prepareJSONataExpression(expression, node)
RED.util.evaluateJSONataExpression(exp, msg, (err, res) => {
node.send({ payload : res})
})