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

Add $currentDate update modifier

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.3
    • Affects Version/s: None
    • Component/s: Write Ops
    • None

      Add a new update modifier where the server will fill in the date/timestamp:

      Usage:

      update({}, {$currentDate: { 
          field : true, //new Date()
          field1: {$type: "date"}, //new Date()
          field2: {$type: "timestamp"} //new Timestamp()
       }}
      

            Assignee:
            greg.mckeon@mongodb.com Gregory McKeon (Inactive)
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: