This code should do it:
> var cursor = db.ClockTime.find()
> while (cursor.hasNext()) {
... var doc = cursor.next();
... db.ClockTime.update({_id : doc._id}, {$set : {ClockInTime : new Date(doc.ClockInTime)}})
... }
More Related Contents:
- MongoDB: Combine data from multiple collections into one..how?
- MongoDB: Is it possible to make a case-insensitive query?
- MongoDB: count the number of items in an array
- How to remove a field completely from a MongoDB document?
- Multiple join conditions using the $lookup operator
- Aggregate $lookup Total size of documents in matching pipeline exceeds maximum document size
- Understanding MongoDB BSON Document size limit
- MongoDB – admin user not authorized
- How can I run MongoDB as a Windows service?
- How do I search for an object by its ObjectId in the mongo console?
- MongoDB password with “@” in it
- exclude fields in $lookup aggregation
- Mongo how to $lookup with DBRef
- Add some kind of row number to a mongodb aggregate command / pipeline
- How to enforce foreign keys in NoSql databases (MongoDB)?
- How do you query for “is not null” in Mongo?
- MongoDB select count(distinct x) on an indexed column – count unique results for large data sets
- MongoDB sort documents by array elements
- MongoDB won’t start after server crash
- Does Mongoose support the Mongodb `findAndModify` method?
- How does sorting with an index work in MongoDB?
- How to use dot in field name?
- Docker: change folder where to store docker volumes
- What is the maximum number of parameters passed to $in query in MongoDB?
- How to organise a many to many relationship in MongoDB
- Mongodb aggregation pipeline how to limit a group push
- Insert json file into mongodb
- Clone a collection in MongoDB
- Return actual type of a field in MongoDB
- Sort nested array of objects