I do control the creation of the objects, but I am not sure why they aren’t already saved as Date type, here is the node.js code for saving Date() with mongoose 5.13.15:
dbo.collection("users").updateMany(
{
accountEmail: ...,
},
{
$set: {
...some other parameter...,
lastModified: Date(),
},
},
);
At no point is it turned into String. Where could this be happening?
And would you mind sharing how to automatically turn any String dates into Date on the Atlas side?