How can I convert the following date which is represented in ticks to a Date object in MongoDb aggregation?
{ "MyDateInTicks" : 637589210301409000 }
I tried this but no luck:
$project : { "ConvertedDate": { $toDate: "$MyDateInTicks" } }
The error message is:
Error parsing date string '637589210301408968'; 16: Unexpected character '6'; 17: Unexpected character '8'