Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "_id" : "6b109972c9bd9d16a09b70b96686f691bfe2f9b6",
- "history" : [
- {
- "dtEntry" : 1428929906,
- "type" : "I",
- "refname" : "ref1"
- },
- {
- "dtEntry" : 1429082064,
- "type" : "U",
- "refname" : "ref1"
- }
- ],
- "c" : "SomeVal",
- "p" : "anotherVal"
- }
- db.mydataset.aggregate({$project:{c:1,p:1,type:"$history.type",DtEntry:"$history.dtEntry",dater:{$dayOfMonth:new Date(DtEntry)}}})
- $dayOfMonth:new Date(DtEntry)
- $dayOfMonth:new Date(history.DtEntry)
- $dayOfMonth:new Date("history.DtEntry")
- $dayOfMonth:new Date("$history.DtEntry")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement