# Grok pattern to format a special date and scientific notation number

**URL:** https://discuss.elastic.co/t/grok-pattern-to-format-a-special-date-and-scientific-notation-number/160786
**Category:** Logstash
**Created:** [December 13, 2018, 5:00pm UTC](https://discuss.elastic.co/t/grok-pattern-to-format-a-special-date-and-scientific-notation-number/160786 "2018-12-13T17:00:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pad/32/16861_2.png) [@pad](https://discuss.elastic.co/u/pad)
#### Post date: [December 13, 2018, 5:00pm UTC](https://discuss.elastic.co/t/grok-pattern-to-format-a-special-date-and-scientific-notation-number/160786/1 "2018-12-13T17:00:40Z")

</div>

Hi,

I'm looking for two special patterns to convert a date with a special format and to convert a number with scientific notation.

For the date, I've got this format yyyyMMdd\_hh:mm:ss (ex: 20181204\_10:50:07)

For the scientific notation, here's what I've got and what I want :

- 2.474731e+01 =\> 24.74731
- 2.211762e+00 =\> 2.211762
- 9.629999e-01 =\> 0.9629999

Thanks for your help

---

<div class="post-metadata">

### Author: ![AquaX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aquax/32/92006_2.png) [@AquaX](https://discuss.elastic.co/u/AquaX)
#### Post date: [December 16, 2018, 1:22am UTC](https://discuss.elastic.co/t/grok-pattern-to-format-a-special-date-and-scientific-notation-number/160786/2 "2018-12-16T01:22:02Z")

</div>

You may need to split the input into multiple fields and then use a ruby filter to manually multiple field A by field B.

---

<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: [January 13, 2019, 1:22am UTC](https://discuss.elastic.co/t/grok-pattern-to-format-a-special-date-and-scientific-notation-number/160786/3 "2019-01-13T01:22:21Z")

</div>

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