If you ever run into MongoDB-collections with documents having date fields that are of type String instead of Date, just use this query:
db.collection.updateMany( {created: {$type: ”string”}}, [{ $set: { created: { $toDate: ”$created” }}}] )
If you ever run into MongoDB-collections with documents having date fields that are of type String instead of Date, just use this query:
db.collection.updateMany( {created: {$type: ”string”}}, [{ $set: { created: { $toDate: ”$created” }}}] )
For further actions, you may consider blocking this person and/or reporting abuse
Ben Halpern -
Jesse Williams -
Megan Lee -
Bala Madhusoodhanan -
Top comments (0)