For one of my collections, which must remain unix timestamp instead of isodate, I usually convert the timestamp with new Date(unix_timestamp).
Now I need the ne
ne
to be able to add a timestamp field from the document, you can do this, given:
{"ts": 1400512120100}
to aggregate as a date:
db.foo.aggregate({ $project: { date: { $add: [new Date(0), "$ts"] } } })