This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hi,
I am getting very confused when trying to retrieve the date and number of records which were created on the date.I have tried using Group and aggregate but nothing seems to work.
I just need to extract how many records were created on each day - not dateTime but date.... which is where my problems begin really.
Using the following almost works but I need the result in date no datetime
db.postjobs.aggregate( [ { $unwind: "$createdAt" }, { $group: { _id: "$createdAt", qty: { $sum: 1 } } } ] )
Can anyone help??
Post Details
- Posted
- 7 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/mongodb/com...