Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db.test2.aggregate([
- {$addFields:{
- dateDiff:{$substract :[new Date(ISODate().getTime() + 24*60*60*1000), '$date']}
- }
- }
- ])
- assert: command failed: {
- "ok" : 0,
- "errmsg" : "Unrecognized expression '$substract'",
- "code" : 168,
- "codeName" : "InvalidPipelineOperator"
- } : aggregate failed
- _getErrorWithCode@src/mongo/shell/utils.js:25:13
- doassert@src/mongo/shell/assert.js:16:14
- assert.commandWorked@src/mongo/shell/assert.js:370:5
- DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1319:5
- @(shell):1:1
- 2017-08-01T13:54:03.865+0300 E QUERY [thread1] Error: command failed: {
- "ok" : 0,
- "errmsg" : "Unrecognized expression '$substract'",
- "code" : 168,
- "codeName" : "InvalidPipelineOperator"
- } : aggregate failed :
- _getErrorWithCode@src/mongo/shell/utils.js:25:13
- doassert@src/mongo/shell/assert.js:16:14
- assert.commandWorked@src/mongo/shell/assert.js:370:5
- DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1319:5
- @(shell):1:1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement