How can I query all completed orders within the last hour? It seems craft is only comparing a date by YYYY-MM-DD
.
Following query collects all orders from the same day, as {{dateFrom}}
would output 2017-10-13
and not eg. 2017-10-13 11:22:08
{% set dateFrom = now|date_modify('-3600 seconds') %}
{% for order in craft.commerce.orders.dateOrdered( '>= ' ~ dateFrom) %}
...
{% endfor %}
adding something like
craft.commerce.orders.dateOrdered( '>= ' ~ dateFrom|date('c'))
would find any orders at all.