# Trim from only one field

**URL:** <https://discuss.elastic.co/t/trim-from-only-one-field/62125>\
**Category:** Logstash\
**Created:** [October 4, 2016, 5:34am UTC](https://discuss.elastic.co/t/trim-from-only-one-field/62125 "2016-10-04T05:34:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chromechris](https://avatars.discourse-cdn.com/v4/letter/c/e47c2d/32.png) [@chromechris](https://discuss.elastic.co/u/chromechris)\
**Post date:** [October 4, 2016, 5:34am UTC](https://discuss.elastic.co/t/trim-from-only-one-field/62125/1 "2016-10-04T05:34:20Z")

</div>

Hello Loggers,

I am wondering how I could be able to trim the value of a string up to a certain point:  
Example:  
2016-03-19-06.00.00.000000

trim only:  
2016-03-19-06.00.00.000

In my mappings the format is:  
"Timestamp": {  
"format": "yyyy-MM-dd-HH.mm.sss",  
"type": "date"  
}

Basically I want to remove the last 3 characters in the field.

Thanks a lot in advance guys,

---

<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:35am UTC](https://discuss.elastic.co/t/trim-from-only-one-field/62125/2 "2017-07-06T04:35:57Z")

</div>


