KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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 new Date(ts) in an aggregation. (the example is in PHP) '$project' => array ( 'day' => '$new Date(ts)', ... '$group' => array ( "_id" => array('day' => '$day)', ...),... does not arrive in the results. The field "day" in the result is missing entirely. How to get this converted within the aggregation?
Tags (comma-separated)
Save Edits
Cancel