Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-3183

Aggregation Builder does not support 'new Date()' in $project stage

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.15.4
    • Component/s: Aggregation pipeline
    • None

      This pipeline works in the shell, but not in the aggregation builder in Compass (see screenshot)

      MongoDB Enterprise > db.deleteme.aggregate([

      ... {

      ... $project: {

      ... description:1,

      ... CLIENTE_ID: 1,

      ... SYSDATE: new Date()

      {{... }}}

      {{... }}}

      ... ])

      {{

      { "_id" : ObjectId("5bb7b050a41eb377486854b2"), "SYSDATE" : ISODate("2018-10-09T19:33:29.364Z") }

      }}

      {{

      { "_id" : ObjectId("5bb7b066a41eb377486854b3"), "SYSDATE" : ISODate("2018-10-09T19:33:29.364Z") }

      }}

      MongoDB Enterprise >

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            scott.stokes@mongodb.com Scott Stokes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: