PHP error when trying to access dates in Sprout Reports Basic Sprout Report here, settings page:
{{ forms.dateTimeField({
  label: &quot;Start Date&quot;|t,
  instructions: &quot;The start date of the date range you wish to display in your report.&quot;|t,
  id: 'datetimeStartDate',
  name: 'datetimeStartDate',
  value: settings.datetimeStartDate is defined ? settings.datetimeStartDate : now|date_modify(&quot;-30 days&quot;)
}) }}

{{ forms.dateTimeField({
  label: &quot;End Date&quot;|t,
  instructions: &quot;The end date of the date range you wish to display in your report.&quot;|t,
  id: 'datetimeEndDate',
  name: 'datetimeEndDate',
  value: (settings.datetimeEndDate is defined ? settings.datetimeEndDate : now)
}) }}

Results page:
{% set purchases = craft.entries()
  .section('purchases')
  .limit(null)
%}

{% if settings.datetimeStartDate and settings.datetimeEndDate %}
  {% set purchases = purchases.postDate('and, &gt;= ' ~ settings.datetimeStartDate.date ~ ', &lt;= ' ~ settings.datetimeEndDate.date)
%}
{% endif %}

I am getting the following PHP error:

PHP Notice – yii\base\ErrorException Undefined property:
DateTime::$date

I have copied the datetime fields directly from the example docs, and tested the results template code with hardcoded dates, which works fine, but passing dates this way does not work.
You can't access date this way, you'd need to use the date (docs) or datetime (docs) or even atom (docs) filters.
In the case of your report, since you have multiple conditions, you would need to pass those as an array and use the atom filter.
Try:
{% set purchases = purchases
    .postDate([
        'and', 
        '&gt;=' ~ settings.datetimeStartDate|atom, 
        '&lt;= ' ~ settings.datetimeEndDate|atom
    ]) %}

Alternatively, you can use before() (docs) and after() (docs) and pass date objects directly:
{% set purchases = purchases
    .after(settings.datetimeStartDate)
    .before(settings.datetimeEndDate) %}