I have an extension attribute for a dateTime field in sales_order
table.
What I want to do on a certain action is to set the value of this field to NOW()
.
How can I perform this?
$order->setData('my_date_time_field', WHAT_SHOULD_I_WROTE_HERE?);
Now I am using the Magento stdLib\DateTime class to get the data, I just want sql to use it's own NOW()
function.
date("Y-m-d H:i:s");