Here is my native query
[ { "$project": { "_id": 1, "Birthday":1,
"age": {"$divide": [{ "$subtract": [ "$$NOW", "$Birthday" ] },(365 * 24 * 60 * 60 * 1000")] },
"wholeAge": {"$floor" : {"$divide": [{ $subtract: [ "$$NOW", "$Birthday" ] },(365 * 24 * 60 * 60 * 1000")] }} }}]
Error is Unable to parse query: JSON reader was expecting a value but found '('.
Is there a workaround for this?
The divide is to convert the milliseconds to year.