Skip to content

Aggregate cannot correctly aggregate date fields #6729

Open
@nothinggift

Description

@nothinggift

Issue Description

I need to count the new data every day

group: {
    objectId: { day: { $dayOfMonth: "$createdAt" }, month: { $month: "$createdAt" }, year: { $year: "$createdAt" } },
    count: { $sum: 1 },
},

Result:
image

Expected Results

Count the same date together

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 3.0.8&4.2.0
    • Operating System: ubuntu
  • Database
    Postgresql 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions