# Error with date filter not working

**URL:** <https://forum.weaviate.io/t/error-with-date-filter-not-working/1127>\
**Category:** General\
**Created:** [December 21, 2023, 11:49pm UTC](https://forum.weaviate.io/t/error-with-date-filter-not-working/1127 "2023-12-21T23:49:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Landon\_Edwards](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/landon_edwards/32/649_2.png) [@Landon\_Edwards](https://forum.weaviate.io/u/Landon_Edwards)\
**Post date:** [December 21, 2023, 11:49pm UTC](https://forum.weaviate.io/t/error-with-date-filter-not-working/1127/1 "2023-12-21T23:49:26Z")

</div>

I am encountering issues with a date filter. An example schema is below.

For some objects the Offline Date Value is ‘9999-12-31T23:59:59Z’ corresponding with having no offline date.

However when I try and filter products which have an offline date greater than the current date I get no results.

I provide an example below. Any help would be appreciated.

For example

```auto
db.client.query.get("Product", ["product_id", "offline_date","upload_date"]).with_where(
    {"path": ["offline_date"], "operator": "GreaterThan", "valueDate":"2023-12-21T23:31:51.66399Z" }
).with_limit(3).do()

```

Returns the result:

```auto
{'data': {'Get': {'Product': []}}}

```

```auto
{
    "class": "Product",
    "description": "Product Info encoded with PaLM embeddings",
   
 
    "properties": [
        {
            "dataType": ["text"],
            "description": "The product id ,
            "indexFilterable": true,
            "indexSearchable": true,
            "moduleConfig": {
                "text2vec-palm": {"skip": false, "vectorizePropertyName": false}
            },
            "name": "product_id",
            "tokenization": "whitespace"
        },
        {
            "dataType": ["date"],
            "description": "The date the product goes offline",
            "moduleConfig": {
                "text2vec-palm": {"skip": true, "vectorizePropertyName": false}
            },
            "name": "offline_date"
        }
    ],
}

```

---

<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:** [December 26, 2023, 7:42pm UTC](https://forum.weaviate.io/t/error-with-date-filter-not-working/1127/2 "2023-12-26T19:42:52Z")

</div>

Hi @Landon_Edwards !

Thanks for reporting!

I was able to reproduce this. Smells like a bug 🪲 to me 🤔

Here some code for reproducing:

```auto
import weaviate
client = weaviate.Client("http://localhost:8080")
client.schema.delete_class("Product")
schema = {
    "class": "Product",
    "description": "Product Info encoded with PaLM embeddings",
    "properties": [
        {
            "dataType": ["text"],
            "description": "The product id" ,
            "indexFilterable": True,
            "indexSearchable": True,
            "moduleConfig": {
                "text2vec-palm": {"skip": False, "vectorizePropertyName": False}
            },
            "name": "product_id",
            "tokenization": "whitespace"
        },
        {
            "dataType": ["date"],
            "description": "The date the product goes offline",
            "moduleConfig": {
                "text2vec-palm": {"skip": True, "vectorizePropertyName": False}
            },
            "name": "offline_date"
        }
    ]
}
client.schema.create_class(schema)

# this data is never fecthed
client.data_object.create({
    "product_id": "123",
    "offline_date": "9999-12-31T23:59:59Z"
    },
    "Product"
)

client.data_object.create({
    "product_id": "321",
    "offline_date": "2000-12-31T23:59:59Z"
    },
    "Product"
)

# show all 2 objects
client.query.get("Product", "product_id offline_date").do()

# should only show 9999 object. but shows none
client.query.get("Product", ["product_id", "offline_date"]).with_where(
    {"path": ["offline_date"], "operator": "GreaterThan", "valueDate":"2023-12-21T23:31:51.66399Z" }
).with_limit(3).do()

# this will only return one result, dated 2023, but not the one dated 9999
client.query.get("Product", ["product_id", "offline_date"]).with_where(
    {"path": ["offline_date"], "operator": "GreaterThan", "valueDate":"1999-12-21T23:31:51.66399Z" }
).with_limit(3).do()

```

I believe that we can go ahead and create a new issue.

Thanks!

---

<div class="post-metadata">

**Author:** ![henry\_m](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/henry_m/32/1479_2.png) [@henry\_m](https://forum.weaviate.io/u/henry_m)\
**Post date:** [May 12, 2024, 3:44pm UTC](https://forum.weaviate.io/t/error-with-date-filter-not-working/1127/3 "2024-05-12T15:44:20Z")

</div>

Using weaviate-client 4.6.0 and weaviate 1.25.0 here, I’m using `3000-01-01T00:00:00+00:00` for my records and they are all less than `2024-04-12T15:31:07+00:00`.

Using `2100-01-01T00:00:00+00:00` however, they are not less than `2024-04-12T15:37:48+00:00`. It seems like an overflow problem.
