I am using
sales_order_place_after event in Magento 2 inside
Namespace/Module_name/etc/. In observer, I am getting order increment id by unable to get order id and created date of Order.
$order = $observer->getEvent()->getOrder(); $orderId = $order->getId(); $createdAt = $order->getCreatedAt();
I am unable to get both order id and created date.
Please help me in this?