# Trouble matching timestamp

**URL:** <https://discuss.elastic.co/t/trouble-matching-timestamp/83768>\
**Category:** Logstash\
**Created:** [April 26, 2017, 8:23pm UTC](https://discuss.elastic.co/t/trouble-matching-timestamp/83768 "2017-04-26T20:23:08Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 28, 2017, 5:12am UTC](https://discuss.elastic.co/t/trouble-matching-timestamp/83768/4 "2017-04-28T05:12:21Z")

</div>

> Is there anything special I need to put into the conf or logstash startup to get more debug output from the date parser?

No, it logs that at the default log level.

> "system\_date" =\> 2017-04-27T21:12:00.000Z,

Aha! The field isn't a string but already is a timestamp, and that's why the date filter fails. That's arguably a bug (I've filed [Date filter fails to parse timestamps · Issue #95 · logstash-plugins/logstash-filter-date · GitHub](https://github.com/logstash-plugins/logstash-filter-date/issues/95)) but there are a couple of workarounds that you can try:

- In your SQL query, typecast the timestamp as a string.
- Use a mutate filter's convert option to typecast the field to a string prior to the date filter.
- Use a mutate filter to copy the timestamp into `@timestamp` and overwrite the existing value (use the `replace` option).

---

_[View the full topic](https://discuss.elastic.co/t/trouble-matching-timestamp/83768)._
