magento-product-_1

getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);

$_productCollection=$this->getLoadedProductCollection();
$_productCollection = Mage::getResourceModel('catalog/product_collection')
->addAttributeToSelect('*')
->addAttributeToFilter('news_from_date', array('date' => true, 'to' => $todayDate))
->addAttributeToFilter('news_to_date', array('or'=> array(
0 => array('date' => true, 'from' => $todayDate),
1 => array('is' => new Zend_Db_Expr('null')))
), 'left');

$now = date("Y-m-d");
$newsFrom= substr($_productCollection->getData('news_from_date'),0,10);
$newsTo=  substr($_productCollection->getData('news_to_date'),0,10);?>
get your collection

 

About Author:

Kalpesh Chavada

Kalpesh Chavada is Our Founder & CEO of Akshar Group Technologies. He is serving with 11+ years of experience in different technologies like Magento, WordPress, Laravel, jQuery, Shopify, Branding, and Digital Marketing. He is very good with creative logic and always ready to take on challenges.

Kalpesh Author