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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.15.4
    • Component/s: Aggregation pipeline
    • None
    • None
    • 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
              Reporter:
              Scott Stokes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: