# Total\_count not working with filters on date values

**URL:** <https://forum.weaviate.io/t/total-count-not-working-with-filters-on-date-values/3247>\
**Category:** Support\
**Created:** [August 1, 2024, 1:21pm UTC](https://forum.weaviate.io/t/total-count-not-working-with-filters-on-date-values/3247 "2024-08-01T13:21:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [August 1, 2024, 7:20pm UTC](https://forum.weaviate.io/t/total-count-not-working-with-filters-on-date-values/3247/2 "2024-08-01T19:20:13Z")

</div>

hi @longspearfish !!

Welcome to our community! 🤗

~~This is a 🐛 bug in the python client.~~  
Edit: Not really…

this is because whatever you pass as the comparison argument, the client will infer the data type to pass it over to Weaviate.

So when you pass a date using string, it will use `valueText` instead of `valueDate`.

Hence the error code:

```auto
cannot use \"valueText\" on type \"date\", use \"valueDate\" instead"

```

[Here is the client code for this](https://github.com/weaviate/weaviate-python-client/blob/5482164c2732db8ea9ce66b1c4743a4c2140b8ac/weaviate/collections/filters.py#L191)

So you need to pass a python date object.

this will work:

```python
from datetime import datetime
timestamp = "2020-01-01T00:00:00Z"
dt = datetime.strptime(timestamp, "%Y-%m-%dT%H:%M:%SZ")
collection.aggregate.over_all(
    filters = Filter.by_property('published_date').greater_or_equal(dt)
).total_count

```

Let me know if this helps!

Thanks!

---

_[View the full topic](https://forum.weaviate.io/t/total-count-not-working-with-filters-on-date-values/3247)._
