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
Maxime -
madhur Saluja -
Deeksha -
Hedera Team -
Top comments (0)