I am trying to find products created in the last hour.
I can sort the products by creation date this way:
$collection = Mage::getModel('catalog/product') ->getCollection() ->addAttributeToSelect('*') ->addAttributeToSort('created_at', 'desc');
But I would like to filter out the created_at file. I tried replacing the last line of the specified block with addAttributeToFilter('created_at', array('gteq' =>$time)); which, I think, should be right, but I cannot find the correct format for $time .
I am on the right track here, and if so, in what format should I feed $time with?
source share