Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. {
  2. "installAt" : "2016-08-01T10:24:38.502Z",
  3. "success" : true
  4. "app" : "web"
  5. }
  6.  
  7. db.sampleCollection.aggregate(
  8. [
  9. {
  10. $group : {
  11. _id : { month: { $month: "$installAt" }, day: { $dayOfMonth: "$installAt" }, year: { $year: "$installAt" } },
  12. count: { $sum: 1 }
  13. }
  14. }
  15. ]
  16. )
  17.  
  18. assert: command failed: {
  19. "errmsg" : "exception: can't convert from BSON type EOO to Date",
  20. "code" : 16006,
  21. "ok" : 0
  22. } : aggregate failed
  23. Error: command failed: {
  24. "errmsg" : "exception: can't convert from BSON type EOO to Date",
  25. "code" : 16006,
  26. "ok" : 0
  27. } : aggregate failed
  28. at Error (<anonymous>)
  29. at doassert (src/mongo/shell/assert.js:11:14)
  30. at Function.assert.commandWorked (src/mongo/shell/assert.js:244:5)
  31. at DBCollection.aggregate (src/mongo/shell/collection.js:1149:12)
  32. at (shell):1:23
  33. 2016-12-07T19:48:25.541+0530 Error: command failed: {
  34. "errmsg" : "exception: can't convert from BSON type EOO to Date",
  35. "code" : 16006,
  36. "ok" : 0
  37. } : aggregate failed at src/mongo/shell/assert.js:13
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement