I'm trying to pull entries from an events channel where a date field falls in the current month. Through google and other SE posts I've gotten to the following code:
{% set currMonth = now|date('m') %}
{% set currMonthFirst = currMonth ~ '/1/' ~ now|date('Y') %}
{% set nextMonthFirst = currMonthFirst|date_modify('+1 month') %}
<p>{{ currMonthFirst|date('m/d/Y') }} - {{ nextMonthFirst|date('m/d/Y') }}</p>
{% set events = craft.entries.section('events').event_startDateTime('>= ' ~ currMonthFirst|date('m/d/Y') ~ ', <' ~ nextMonthFirst|date('m/d/Y')) %}
{% for event in events %}
<h1>{{event.title}}</h1>
{% endfor %}
currMonthFirst and nextMonthFirst both output the dates I'd expect, but when I use the set & for loop I get the following error - Fatal error: Call to a member function getTimestamp() on a non-object. Any idea what I'm doing wrong here or how to make what I'm trying to do work?