# Hubspot client api filter dates

**URL:** <https://community.hubspot.com/t/hubspot-client-api-filter-dates/80180>\
**Category:** APIs & Integrations\
**Tags:** timeline-and-extensions-apis\
**Created:** [April 27, 2023, 2:14pm UTC](https://community.hubspot.com/t/hubspot-client-api-filter-dates/80180 "2023-04-27T14:14:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelhsu2011](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@michaelhsu2011](https://community.hubspot.com/u/michaelhsu2011)\
**Post date:** [April 27, 2023, 2:14pm UTC](https://community.hubspot.com/t/hubspot-client-api-filter-dates/80180/1 "2023-04-27T14:14:55Z")

</div>

Hi,  
I’m trying to get the latest record by using the searchApi.doSearch. Is this the correct format?

“filterGroups”: [

{

“filters”:[

{

“propertyName”: “createdate”,

“operator”: “GTE”,

“value”: “2023-04-20”

}

]

}

---

<div class="post-metadata">

**Author:** ![michaelhsu2011](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@michaelhsu2011](https://community.hubspot.com/u/michaelhsu2011)\
**Post date:** [April 27, 2023, 3:13pm UTC](https://community.hubspot.com/t/hubspot-client-api-filter-dates/80180/2 "2023-04-27T15:13:09Z")

</div>

Also, the api [https://api.hubapi.com/companies/v2/companies/recent/created?since=1714089600&count=2](https://api.hubapi.com/companies/v2/companies/recent/created?since=1714089600&Count=2) reacently created/modified for deal and companies, the since and count is not working.

---

<div class="post-metadata">

**Author:** ![RComet](https://avatars.discourse-cdn.com/v4/letter/r/ecd19e/32.png) [@RComet](https://community.hubspot.com/u/RComet)\
**Post date:** [September 5, 2024, 12:00pm UTC](https://community.hubspot.com/t/hubspot-client-api-filter-dates/80180/3 "2024-09-05T12:00:49Z")

</div>

TL:DR: Hubspot CRM Search API expects for their datetime field. It is in UNIX Epoch timestamp in milliseconds format. If it is just the date, the date at 12:00 AM (00 hours 00 mins 00 secs). Here’s an example of what 31 Aug, 2024 is: **1722297600000**. Pass it as a string to the API.

[source](https://www.atpeaz.com/hubspot-api-date-format-search-api/)
