# Valid ISO8601 and RFC3339 date string discarded as invalid

**URL:** <https://forum.weaviate.io/t/valid-iso8601-and-rfc3339-date-string-discarded-as-invalid/2514>\
**Category:** Support\
**Created:** [May 28, 2024, 8:42am UTC](https://forum.weaviate.io/t/valid-iso8601-and-rfc3339-date-string-discarded-as-invalid/2514 "2024-05-28T08:42:41Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![rjalex](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/rjalex/32/807_2.png) [@rjalex](https://forum.weaviate.io/u/rjalex)\
**Post date:** [May 31, 2024, 1:29pm UTC](https://forum.weaviate.io/t/valid-iso8601-and-rfc3339-date-string-discarded-as-invalid/2514/9 "2024-05-31T13:29:11Z")

</div>

Hi there @jphwang nice to hear from you!

Now all works well.

As so many other things about Weaviate the way you define the server may influence the way you declare a collection and this will definitely impact on the way you insert and query your object’s properties.

In my case now isoEditionDate is declared as DATE,

```auto
        wvcc.Property(
            name="isoEditionDate",
            data_type=wvcc.DataType.DATE, # DATE for RFC3339 ISO8601 date
            skip_vectorization=True,
        ),

```

when I insert the data I make sure that whatever is passed is converted to an ISO8601/RFC3339 fulll format datetime value including the timezone info:

```auto
document["isoEditionDate"] = rome_tz.localize(
            datetime.strptime(mdb_document["isoEditionDate"], "%Y-%m-%d")
        )

```

and lastly the filters take this into account (and by virtue of complex but poweful pydantic declarations I check that the input dates are valid and that fromDate is always \<= toDate.

Thanks to all of you guys, you rock!

---

_[View the full topic](https://forum.weaviate.io/t/valid-iso8601-and-rfc3339-date-string-discarded-as-invalid/2514)._
