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
Okoye Ndidiamaka -
Rafael A P Nascimento -
Rakesh KR -
Apoorv Khandelwal -
Top comments (0)