# Sort by Timestamp not work

**URL:** <https://community.graylog.org/t/sort-by-timestamp-not-work/14942>\
**Category:** Graylog Central (peer support)\
**Tags:** pipeline-rules, debuggingpl\
**Created:** [April 13, 2020, 6:47am UTC](https://community.graylog.org/t/sort-by-timestamp-not-work/14942 "2020-04-13T06:47:09Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![david\_graylog13](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/david_graylog13/32/5152_2.png) [@david\_graylog13](https://community.graylog.org/u/david_graylog13)\
**Post date:** [April 14, 2020, 1:24pm UTC](https://community.graylog.org/t/sort-by-timestamp-not-work/14942/5 "2020-04-14T13:24:41Z")

</div>

Hi agian 😉  
I’m using a pipeline get Timestamp from message body and save to new filed`(New_Time)`  
my pipeline:

```auto
rule "CreateNewFormatTimestamp"
when
 from_input("5e8c0edb50401d5943c76fcf")
 then
//"Timestamp":"2020-04-14T17:26:47.6146998+04:30"
let GetTime = ($message.Timestamp);
//2020-04-14T16:39:01.214
let GetTime = substring(to_string(GetTime), 0, 23);
set_field("New_Time", parse_date(value:to_string(GetTime), pattern:"yyyy-MM-dd'T'HH:mm:ss.SSS"));
end   

```

Then checked `Elasticsearch` type field.

 ![elasticsearch-type-date](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/a/a2f935edde42f8de3e8aa4161a7e1e7f5587840a.png)  
type is `date` but sort does not works yet!  
 ![sort-by-new-time](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/f/fb9fcc4f069748e669319f68cc0bf0d1d3200810.png)

Also, this field `(New_Time)` is not shown in the list of fields left side `SORTING`.

 ![list-field](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/3/3b3509f89f19edad70e2b7b65b50c830f0715b3f.png)

Thank you for your patience.🌻

---

_[View the full topic](https://community.graylog.org/t/sort-by-timestamp-not-work/14942)._
