I have this data time in mongo collection:
{
...
"CreationDateTime" : ISODate("2017-03-06T08:16:02.930Z"),
...
},
....
{
...
"CreationDateTime" : ISODate("2018-03-06T08:16:04.030Z"),
...
},...
I want to grouping my collection by hour. Means i want to those documents are in 8 o'clock comes in same group and those documents are in 9 o'clock comes in same group. because i want to select first document in same group. Someone have any logic or idea for this grouping with it's accumulator Operator?