Update Table Table_Name
Set ObservationTime = 'YYYY-MM-DD HH:MM:SS'
Where ObservationTime Between 'YYYY-MM-DD HH:MM:SS' and 'YYYY-MM-DD HH:MM:SS'
请帮助我在Mongo Db中复制相同内容。
答案 0 :(得分:0)
尝试以下
db.col.updateMany(
{ObservationTime : {$gte: "minTime"}, ObservationTime : {$lt : "maxTime"}},
{$set : {ObservationTime : "newTime"}}
)
这里
minTime - is your start time
maxTime - is your end time
newTime - time to be updated