How can I create Date time Instance in Magento For example 11-30-2016 5:00:00 pm.
remember this should be a datetime variable and not a string variable so that I can do Datetime operations on it.
Magento 2 – Create Date Time Instance
datetimemagento2
Best Answer
You can use php Datetime object
Magento framework also suggests classes for doing that. You need to inject in your construct method this class
and then get the time with