# Convert time in a lot off fields in Logstash

**URL:** https://discuss.elastic.co/t/convert-time-in-a-lot-off-fields-in-logstash/84288
**Category:** Logstash
**Created:** [May 2, 2017, 3:14pm UTC](https://discuss.elastic.co/t/convert-time-in-a-lot-off-fields-in-logstash/84288 "2017-05-02T15:14:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![paracetamol](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@paracetamol](https://discuss.elastic.co/u/paracetamol)
#### Post date: [May 2, 2017, 3:14pm UTC](https://discuss.elastic.co/t/convert-time-in-a-lot-off-fields-in-logstash/84288/1 "2017-05-02T15:14:20Z")

</div>

Hi,  
My input is a json with tis values:

windMaxTime: "10:10"  
dewpointMaxTime: "10:09"

date {  
match =\> ["stats[sinceMidnight][windMaxTime]","HH:mm"]  
target =\> "stats[sinceMidnight][windMaxTime]"  
timezone =\> "UTC"  
}  
date{  
match =\> ["stats[sinceMidnight][dewpointMaxTime]","HH:mm"]  
target =\> "stats[sinceMidnight][dewpointMaxTime]"  
timezone =\> "UTC"  
}  
date{  
match =\> ["stats[sinceMidnight][tempMinTime]","HH:mm"]  
target =\> "stats[sinceMidnight][tempMinTime]"  
timezone =\> "UTC"  
}

It works, but i have a lot of fields with name like xxxxxTime.

So, can i use a regular expression to convert field like xxxxxTime with value XX:XX in format DATE ???

Thank's a lot !

---

<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: [May 3, 2017, 8:37am UTC](https://discuss.elastic.co/t/convert-time-in-a-lot-off-fields-in-logstash/84288/2 "2017-05-03T08:37:52Z")

</div>

No, the date filter has no wildcard support. You could use a ruby filter though (or generate your configuration file from a template).

---

<div class="post-metadata">

### Author: ![paracetamol](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@paracetamol](https://discuss.elastic.co/u/paracetamol)
#### Post date: [May 3, 2017, 9:03am UTC](https://discuss.elastic.co/t/convert-time-in-a-lot-off-fields-in-logstash/84288/3 "2017-05-03T09:03:12Z")

</div>

Arfff Thank's Magnus

---

<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: [May 31, 2017, 9:17am UTC](https://discuss.elastic.co/t/convert-time-in-a-lot-off-fields-in-logstash/84288/4 "2017-05-31T09:17:08Z")

</div>

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