Php – Show product creation & last edit dates on Frontend in Magento

magentomysqlphp

I've seen the two attributes in the MySQL database at table catalog_product_entity

the fields are 'created_at' and 'updated_at'

How do I get them to show up on frontend?

Best Solution

The attributed can simply be added using the getAttributeName() function, for instance, to get created_at, just add the following php script to the phtml page:

<?php echo $_product->getCreatedAt();?>

For updated_at, use:

<?php echo $_product->getUpdatedAt();?>