In PHP -> MongoDB, how do I return a field as a calculated value?
$this->Collection = $this->db->$theDB;
$cursor = $this->Collection->find();
For example, one of my fields is date of birth:
DOB : 1/1/1980
Instead, I want to get back the AGE. Current Date – DOB = AGE.
Is this possible / how?
You could do a map-reduce and process the age like that