Formating String date to ISOdate or Object Date in MongoDB

MongoDB stores the date in ISODate format which is nothing but a wrapper for the Date object of Javascript. If some how your database has stored to string date, you can convert them to ISO by running following query directly in mongo terminal

    .forEach( function(item){

        if (typeof(item.date_updated) == "string"){
            item.date_updated = new ISODate(item.date_updated);