# Date format in Elasticsearch

**URL:** <https://discuss.elastic.co/t/date-format-in-elasticsearch/289608>\
**Category:** Logstash\
**Created:** [November 18, 2021, 2:31pm UTC](https://discuss.elastic.co/t/date-format-in-elasticsearch/289608 "2021-11-18T14:31:07Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [November 18, 2021, 4:43pm UTC](https://discuss.elastic.co/t/date-format-in-elasticsearch/289608/4 "2021-11-18T16:43:27Z")

</div>

If you want the field on the document to be a [date](https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html), then it is stored as milliseconds since the epoch, so it cannot store the date without the time.

If you want a string in a different format then [this](https://discuss.elastic.co/t/how-to-change-date-format-from-yyyy-mm-dd-to-dd-mmm-yyyy/132569/2) shows an example.

If you just want the date why are you using a date filter at all?

---

_[View the full topic](https://discuss.elastic.co/t/date-format-in-elasticsearch/289608)._
