2013-11-21 203 views
0

有一个MySQL查询如下,UNIX_TIMESTAMP到蒙戈

SELECT Unix_Timestamp(last_executed) 
    FROM mpres_seq 

现在我需要做同样的事情在PHP和MongoDB中。在mongodb中,我保存了last_executed作为ISO Date。我怎样才能做到这一点? 如果我使用 $collection = $global["dbmongo"] -> mpres_seq; $res = $collection->find(),array("last_executed"=>1,"_id"=>0));

是否适合我。我想last_executed,在相同类型和相同的模式在MySQL

+0

可能重复[ MongoDB的ISODate()与UNIX时间戳](http://stackoverflow.com/questions/6332975/mongodbs-isodate-vs-unix-timestamp) – hek2mgl

回答