# Problem formatting Log Timestamp

**URL:** <https://discuss.elastic.co/t/problem-formatting-log-timestamp/59262>\
**Category:** Logstash\
**Created:** [August 30, 2016, 2:29am UTC](https://discuss.elastic.co/t/problem-formatting-log-timestamp/59262 "2016-08-30T02:29:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RaviSidhu](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@RaviSidhu](https://discuss.elastic.co/u/RaviSidhu)\
**Post date:** [August 30, 2016, 2:29am UTC](https://discuss.elastic.co/t/problem-formatting-log-timestamp/59262/1 "2016-08-30T02:29:45Z")

</div>

Hi All,

As a test, I am querying a DB using logtash and printing the output on the prompt. I have two columns access\_date(29-AUG-16) and access\_time(11:30:45) in the DB. While querying, I concatenate the two fields.

`select access_date||' '||access_time as access_date_time from test_table`  
The result is 29-AUG-16 11:30:45.

I want to set the @timestamp field to this value. So, in the filter, I use  
`filter`  
`{`  
`date{`  
`match => ["access_date_time","DD-MMM-YY HH:mm:ss"]`  
`}`  
`}`

But the output always picks up 01 for month.  
`"@timestamp" => "2016-01-29T17:00:45.000Z"`

Please advice.

---

<div class="post-metadata">

**Author:** ![RaviSidhu](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@RaviSidhu](https://discuss.elastic.co/u/RaviSidhu)\
**Post date:** [August 30, 2016, 2:33am UTC](https://discuss.elastic.co/t/problem-formatting-log-timestamp/59262/2 "2016-08-30T02:33:55Z")

</div>

This has been resolved. The date match should have used a lowercase 'dd' instead of 'DD' in the match pattern.

---

<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:** [July 6, 2017, 4:41am UTC](https://discuss.elastic.co/t/problem-formatting-log-timestamp/59262/3 "2017-07-06T04:41:01Z")

</div>


