Magento2: Add column sale grid

The following code will demonstrate how one can add last order updated date (updated_at) in sales order grid.This column is most useful one while order processing.

We will achieve above result in two steps.

  1. Creating bare minimum extension.
  2. using ui_component

1. Creating Extension :
A bare minimum extension can be created using online tools such as “” or “” website.

2. Using UI_Component
One has to override base code (XML) to add a new column.
Lets create “sales_order_grid.xml” file in following location. File name is importent as it must match code structure.


One can look into core code to use for reference.


	<listing xmlns:xsi="http://www.......xsd">
<column name="updated_at" class="Magento\Ui\Component\Listing\Columns\Date">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">dateRange</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
<item name="dataType" xsi:type="string">date</item>
<item name="label" xsi:type="string" translate="true">Updated Date</item>
<item name="dateFormat" xsi:type="string">MMM dd, YYYY, H:mm:ss A</item>

Thats it Enable the extension and clean the cache.


You can find code on GitHub



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s