I am trying to update datatype of a column in mongodb dataset, but even after successful run of command expected changes are not reflecting in compass.
query:
db.EquityPrice.find().forEach(function(data) {
db.EquityPrice.update({_id : doc._id}, {$set : {Trade_Date : new Date(doc.Trade_Date) }});
})
Can anyone please help to figure out where I am going wrong?