Unix_Timestamp到mongo

there is a mysql query as follow,

SELECT Unix_Timestamp(last_executed)
    FROM mpres_seq

now i need to do same thing in php with MongoDB. In mongodb i have saved last_executed as ISO Date. How can i do that? if i used $collection = $global["dbmongo"] -> mpres_seq; $res = $collection->find(),array("last_executed"=>1,"_id"=>0));

Is it work for me. I want to get last_executed, in same type and same pattern in mysql

You simply print out the secs of the MongoDate:

foreach($res as $row){
    echo $doc['last_executed']->sec;
}

Reference:

http://php.net/manual/en/class.mongodate.php