# Time pattern recognized as string

**URL:** <https://discuss.elastic.co/t/time-pattern-recognized-as-string/117677>\
**Category:** Elasticsearch\
**Created:** [January 30, 2018, 6:00pm UTC](https://discuss.elastic.co/t/time-pattern-recognized-as-string/117677 "2018-01-30T18:00:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![suryagprakash](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@suryagprakash](https://discuss.elastic.co/u/suryagprakash)\
**Post date:** [January 30, 2018, 6:00pm UTC](https://discuss.elastic.co/t/time-pattern-recognized-as-string/117677/1 "2018-01-30T18:00:26Z")

</div>

Hi,

I am new with ELK concepts, I need a help with TIME pattern. The value from input is in HH:mi:ss format (00:01:05) and in elasticsearch its recognized as string.  
Can elasticsearch be forced to recognize this as date or time format so that I can use this field for aggregations?  
I want to use this field values for creating table wth max, min and avg values.

Logstash entry  
if [type] == "testing\_pattern" {  
grok {  
patterns\_dir =\> ".\software\patterns"   
match =\> {"message" =\> ["%{TIME:time\_test}"]}  
}  
date {  
match =\> ["time\_test", "HH:mm:ss"]  
#timezone =\> "UTC"  
}  
}

Please let me know if you need any further details?

---

<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:** [February 27, 2018, 6:00pm UTC](https://discuss.elastic.co/t/time-pattern-recognized-as-string/117677/2 "2018-02-27T18:00:43Z")

</div>

Closed on February 27, 2018, 6:00pm UTC

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