# Datetime format

**URL:** <https://discuss.elastic.co/t/datetime-format/250360>\
**Category:** Logstash\
**Created:** [September 29, 2020, 12:49pm UTC](https://discuss.elastic.co/t/datetime-format/250360 "2020-09-29T12:49:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RPL\_Developer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rpl_developer/32/47522_2.png) [@RPL\_Developer](https://discuss.elastic.co/u/RPL_Developer)\
**Post date:** [September 29, 2020, 12:49pm UTC](https://discuss.elastic.co/t/datetime-format/250360/1 "2020-09-29T12:49:46Z")

</div>

I am using MariaDB database there I have enter simple date without any timestamp but when data is going to Elasticsearch there is some timestamp along with the date. Please someone help me out in this

---

<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:** [September 29, 2020, 2:12pm UTC](https://discuss.elastic.co/t/datetime-format/250360/2 "2020-09-29T14:12:08Z")

</div>

If you are referring to the @timestamp field then yes, by default it has a date and time. If you are referring to another field you would have to explain how it was set.

If you want to set a field to the current date (as a string) you could call Date.today.strftime in a ruby filter (with a format string for whatever format you want the date presented in).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 27, 2020, 2:12pm UTC](https://discuss.elastic.co/t/datetime-format/250360/3 "2020-10-27T14:12:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
