OData error message - Version 3 and 4
Date filter and other changes required for OData queries when moving from version 3 to 4
Table of Contents
With an OData query written in version 3 of OData, when your Merchanter system runs with version 4 of OData the syntax of the query may be different to extract the required data. When you try to refresh the report you may get an error message similar to the image below.

Changing the Datetime filter
With version 4 of OData date fields no longer need to be specified as datetime in the query string. To update this in a query:
- Open the report (Excel spreadsheet)
- Click on the ‘Data’ tab
- Click on ‘Queries & Connections’
- Right click on the Query and click ‘Edit’

- In Power Query highlight the query if you have more than one
- Click ‘Advanced Editor’

- In the Query string where you have filters that are a date they will be specified as a ‘datetime’ type

- In version 4 of OData this is no longer required, so delete the text “datetime” and the single quotation marks round the date

- Click ‘Done’ and the query will refresh
- Click ‘Close & Load’ to return to the refreshed report