We can find the Create At field in table: catalog_product_entity
.
So, for this field, we only need to show it:
For example:
app/code/Vendor/Catalog/view/adminhtml/ui_component/product_listing.xml
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<columns name="product_columns" class="Magento\Catalog\Ui\Component\Listing\Columns">
<column name="created_at" component="Magento_Ui/js/grid/columns/date">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">dateRange</item>
<item name="dataType" xsi:type="string">date</item>
<item name="label" xsi:type="string" translate="true">Created Date</item>
<item name="sortOrder" xsi:type="number">71</item>
</item>
</argument>
</column>
</columns>
</listing>
Remember to create registration and module.xml.
[Note]
The create_at
result will be different from database. Because
As we use default value CURRENT_TIMESTAMP for TIMESTAMP type columns
we need to set GMT timezone
\Magento\Framework\DB\Adapter\Pdo\Mysql::connect()
$this->_connection->query("SET time_zone = '+00:00'");