# Filtering on datetime fields does not seem possible

**URL:** <https://community.baserow.io/t/filtering-on-datetime-fields-does-not-seem-possible/6515>\
**Category:** Integrations\
**Created:** [November 6, 2024, 7:49pm UTC](https://community.baserow.io/t/filtering-on-datetime-fields-does-not-seem-possible/6515 "2024-11-06T19:49:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjmurre](https://community.baserow.io/letter_avatar_proxy/v4/letter/j/ea666f/32.png) [@jjmurre](https://community.baserow.io/u/jjmurre)\
**Post date:** [November 6, 2024, 7:49pm UTC](https://community.baserow.io/t/filtering-on-datetime-fields-does-not-seem-possible/6515/1 "2024-11-06T19:49:26Z")

</div>

I want to filter baserow results using the API based on a timestamp (data + time). As far as I can see in the documentation, a `later_than` can only be done based on a date, not on a datetime. The same goes for the formula-builder in the baserow UI.

Regards, Jan

---

<div class="post-metadata">

**Author:** ![cezary](https://community.baserow.io/user_avatar/community.baserow.io/cezary/32/2510_2.png) [@cezary](https://community.baserow.io/u/cezary)\
**Post date:** [November 8, 2024, 3:02pm UTC](https://community.baserow.io/t/filtering-on-datetime-fields-does-not-seem-possible/6515/2 "2024-11-08T15:02:36Z")

</div>

Hi!

Could you show API call you’re making?

---

<div class="post-metadata">

**Author:** ![jjmurre](https://community.baserow.io/letter_avatar_proxy/v4/letter/j/ea666f/32.png) [@jjmurre](https://community.baserow.io/u/jjmurre)\
**Post date:** [November 11, 2024, 6:44am UTC](https://community.baserow.io/t/filtering-on-datetime-fields-does-not-seem-possible/6515/3 "2024-11-11T06:44:32Z")

</div>

Hi, @cezary, the fulter builder only gives me the possibility to insert a data, not a time.

![image](https://community.baserow.io/uploads/default/original/2X/8/8f0a1f48dfa4e46e2984a972cc1208dfe5a32ee1.png)

---

<div class="post-metadata">

**Author:** ![cezary](https://community.baserow.io/user_avatar/community.baserow.io/cezary/32/2510_2.png) [@cezary](https://community.baserow.io/u/cezary)\
**Post date:** [November 12, 2024, 5:03pm UTC](https://community.baserow.io/t/filtering-on-datetime-fields-does-not-seem-possible/6515/4 "2024-11-12T17:03:45Z")

</div>

Yes, this seems to be a bug in date picker. There’s a fix coming up: [Data source does not allow filtering based on datetime (#3181) · Issues · Baserow / baserow · GitLab](https://gitlab.com/baserow/baserow/-/issues/3181)

---

<div class="post-metadata">

**Author:** ![jjmurre](https://community.baserow.io/letter_avatar_proxy/v4/letter/j/ea666f/32.png) [@jjmurre](https://community.baserow.io/u/jjmurre)\
**Post date:** [November 13, 2024, 6:55am UTC](https://community.baserow.io/t/filtering-on-datetime-fields-does-not-seem-possible/6515/5 "2024-11-13T06:55:13Z")

</div>

Ah, that’s great! So, this means that using a date-time through the API is already possible?

And, if so, how should a datetime parameter be formatted?  
Something like: yyyy-mm-dd:hhMMss, or an ISO format or something else?

---

<div class="post-metadata">

**Author:** ![cezary](https://community.baserow.io/user_avatar/community.baserow.io/cezary/32/2510_2.png) [@cezary](https://community.baserow.io/u/cezary)\
**Post date:** [November 15, 2024, 1:40pm UTC](https://community.baserow.io/t/filtering-on-datetime-fields-does-not-seem-possible/6515/6 "2024-11-15T13:40:47Z")

</div>

> As far as I can see in the documentation, a `later_than` can only be done based on a date, not on a datetime

This is a bit more complex topic. First of all, there are two flavors of date filters. They differ internally in the way date comparison is executed. Old `date_before`/`date_after` operate on a single value, while `date_is_before`/`date_is_after` operate on lower/upper bounds of a range `(datetime, datetime+1 day)`. Both accept datetime values, but the accepted value format is slightly different. Old filters are marked as deprecated. They are not available in UI, but will work with API. Note that they may be removed at some point.

Old filters accept `"Europe/Amsterdam?2024-10-11 12:13:14"` value, new requires additional operator: `Europe/Amsterdam?2024-10-11 12:13:14?exact_date`. For datetime part you should be able to send full ISO value as well.

New filters operate on a date range, and because of that datetime values may require an adjustment to have correct results. As I wrote before, each filter operates on a range `datetime, datetime+1 day`. Depending on a filter, lower or upper bound can be used to create a database query. For example, `date_is_on_or_after` will use lower bound with `>=` operator (so the internal expression is an equivalent of `row_value >= datetime`, and `date_is_after` will use upper bound with that operator (so the internal expression is an equivalent of `row_value >= (datetime + 1 day)`. So, if you want to filter `date_is_after` `Europe/Amsterdam?2024-10-11 12:13:14?exact_date`, you actually should set filter’s value to `Europe/Amsterdam?2024-10-10 12:13:14?exact_date` for that specific filter.

Note that we’re working on improving datetime filtering part.

---

<div class="post-metadata">

**Author:** ![jjmurre](https://community.baserow.io/letter_avatar_proxy/v4/letter/j/ea666f/32.png) [@jjmurre](https://community.baserow.io/u/jjmurre)\
**Post date:** [November 21, 2024, 12:30pm UTC](https://community.baserow.io/t/filtering-on-datetime-fields-does-not-seem-possible/6515/7 "2024-11-21T12:30:39Z")

</div>

Hi @cezary Tx for your detailed reply, that is really helpful!

---

<div class="post-metadata">

**Author:** ![gaurang1745](https://community.baserow.io/user_avatar/community.baserow.io/gaurang1745/32/4383_2.png) [@gaurang1745](https://community.baserow.io/u/gaurang1745)\
**Post date:** [September 15, 2025, 7:09pm UTC](https://community.baserow.io/t/filtering-on-datetime-fields-does-not-seem-possible/6515/8 "2025-09-15T19:09:51Z")

</div>

Hi @cezary

I am currently working on the self-hosted version 1.35.0  
I am still facing some issues when filtering based on the dates. Please see if you can help.

The filter condition I’m using `{"filter_type":"AND","filters":[{"type":"date_is_on_or_after","field":"CreatedAt","value":"UTC?2025-09-12 19:13:00?exact_date"}]}`

In the results, I am getting the rows with `CreatedAt` value before the time mentioned in the filter. Some of the values in the result for the specific column are

```auto
"CreatedAt": "2025-09-12T19:09:40.265738Z",
"CreatedAt": "2025-09-12T19:10:09.936524Z",
"CreatedAt": "2025-09-12T19:11:21.191881Z",

```

As per my understanding, any of this results shouldn’t appear for the current query. Or am I missing something?

Thnx,  
Gaurang

---

<div class="post-metadata">

**Author:** ![cezary](https://community.baserow.io/user_avatar/community.baserow.io/cezary/32/2510_2.png) [@cezary](https://community.baserow.io/u/cezary)\
**Post date:** [September 16, 2025, 7:50am UTC](https://community.baserow.io/t/filtering-on-datetime-fields-does-not-seem-possible/6515/9 "2025-09-16T07:50:57Z")

</div>

You can enforce a specific timezone for timestamps in date field configuration. Ensure, you have selected UTC there.

---

<div class="post-metadata">

**Author:** ![gaurang1745](https://community.baserow.io/user_avatar/community.baserow.io/gaurang1745/32/4383_2.png) [@gaurang1745](https://community.baserow.io/u/gaurang1745)\
**Post date:** [September 16, 2025, 8:12am UTC](https://community.baserow.io/t/filtering-on-datetime-fields-does-not-seem-possible/6515/10 "2025-09-16T08:12:16Z")

</div>

Everything over here is in UTC but seems like filtering is not working. The filters I’m trying are has the exact date(including time) in UTC. Also as we can see the created date that I queried using API is also in UTC. But still with filters the output is not as expected.

As per the filters, I want to have anything that is created on or after the exact datetime, but output certainly contains rows where is is before the datetime mentioned in filters

If you can check for me I can give you url and db token of my dev instance to try it.
