Hi there,
It’s possible to do this using pipeline updates, I’ll show what it looks like in JS/mongo shell and you can translate it to C# then:
db.uptype.update(
{"tag.tagExceptions.exceptionDate":{$type:"string"}},
[{$set:{"tag.tagExceptions":{$map:{
input:"$tag.tagExceptions",
in:{$cond:{
if:{$eq:["string",{$type:"$$this.exceptionDate"}]},
then:{$mergeObjects:["$$this", {exceptionDate:{$toDate:"$$this.exceptionDate"}}]},
else:"$$this"
}}
}}}}])
Asya