Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-58468

Querying Date inside $or

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      I am trying to find the value using the below $OR query in Mongodb but in the value of deactivateddate is wrongly showing as [Object]

      *var Query = {$or: [

      {isActive:false}

      ,{isActive:true,deactivatedDate: moment().utc().subtract(10,'d').format()}]};*

      when I am console the query I sent to the mongodb I got this

      {$or: [{isActive:false},{isActive:true,deactivatedDate: [Object]}]}

      Attachments

        Activity

          People

            Unassigned Unassigned
            vasanthank29@gmail.com Vasanthan K
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: