Created
          December 29, 2015 17:33 
        
      - 
      
 - 
        
Save marcoberri/5b40057a19e0aa80be93 to your computer and use it in GitHub Desktop.  
    Fix IsoData to Millis in other field
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var dbOne = db.getSisterDB('mbmeteolacrosse'); | |
| var cur = dbOne.rawdata.find({"tsMillis":{"$exists":false}},{"_id":1,"ts":1}).addOption(DBQuery.Option.noTimeout); | |
| var updated=0; | |
| cur.forEach(function(doc) { | |
| dbOne.rawdata.update({"_id":doc._id},{"$set" : {"tsMillis":doc.ts.getTime()}}); | |
| updated = updated + 1; | |
| }); | |
| print("Tot update field tsMillis:" + updated); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment