Retrieve information from date filter - Api V8

I am trying to get information from Campaigns module using this endpoint with the filter via postman:

{{suitecrm.url}}/Api/V8/module/Campaign?filter[date_entered][eq]=2021-06-08T14:45:00+00:00

The response is :

{
    "meta": {
        "message": "Request was successful, but there is no result"
    },
    "data": []
}

I know that there is a campaign with this date_entered value. Any idea of what is happening or the format of the date. In the document don´t touch the dates in the filters so information is not enough.

Any idea well be welcomed. Thanks.

Hi,

Sadly the V8 API documentation doesn’t specify how to use filters with date fields

I need to figure this out myself so when I find out, I’ll share it here

Coming back to edit this as my response wasn’t 100% correct.

I said that the SuiteCRM API expects an ISO date string,
This is almost true,

you need to make some modifications to the date string first before the API accepts it.
considering the folllowing string
‘2025-05-01T15:29:37.865Z’
You need to remove the T and the dot

so it will show as
‘2025-05-01 15:29:37’

here’s a function I made in Typescript

const formatDateTimeForCRMAPI = (value: number | string | Date) => new Date(value).toISOString().replace('T', ' ').split('.')[0]