# Timestamp sorting in a search, is not sorting on milliseconds

**URL:** <https://discuss.elastic.co/t/timestamp-sorting-in-a-search-is-not-sorting-on-milliseconds/373842>\
**Category:** Kibana\
**Created:** [January 29, 2025, 3:52pm UTC](https://discuss.elastic.co/t/timestamp-sorting-in-a-search-is-not-sorting-on-milliseconds/373842 "2025-01-29T15:52:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Casper\_Thrane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/casper_thrane/32/49777_2.png) [@Casper\_Thrane](https://discuss.elastic.co/u/Casper_Thrane)\
**Post date:** [January 29, 2025, 3:52pm UTC](https://discuss.elastic.co/t/timestamp-sorting-in-a-search-is-not-sorting-on-milliseconds/373842/1 "2025-01-29T15:52:23Z")

</div>

Hi

We have a search, which is sorted default by @timestamp. But is it not sorted correctly, on the milliseconds level. Here are the lines from the search.

```auto
Jan 29, 2025 @ 16:34:36.040	dokument-lager-service-spring	ERROR	IllegalStateException	No service-name for service-token	77f09979d9d490251d8d60efc53243a3	APM	Access logs
Jan 29, 2025 @ 16:34:36.094	straffe-dirigent-spring	ERROR	WebClientResponseException$InternalServerError	500 Internal Server Error from POST http://dokument-lager-service/dokumenter/e377cf8a-f19c-4eea-b4ff-a82b2bc27f9f/tagEjerskab	77f09979d9d490251d8d60efc53243a3	APM	Access logs
Jan 29, 2025 @ 16:34:36.103	straffe-dirigent-spring	ERROR	WebClientResponseException$InternalServerError	500 Internal Server Error from POST http://dokument-lager-service/dokumenter/e377cf8a-f19c-4eea-b4ff-a82b2bc27f9f/tagEjerskab	77f09979d9d490251d8d60efc53243a3	APM	Access logs
Jan 29, 2025 @ 16:34:36.041	dokument-lager-service-spring	ERROR	IllegalStateException	No service-name for service-token	77f09979d9d490251d8d60efc53243a3	APM	Access logs

```

Any idea why, or what I can do?

---

<div class="post-metadata">

**Author:** ![jessgarson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jessgarson/32/129841_2.png) [@jessgarson](https://discuss.elastic.co/u/jessgarson)\
**Post date:** [February 4, 2025, 10:12pm UTC](https://discuss.elastic.co/t/timestamp-sorting-in-a-search-is-not-sorting-on-milliseconds/373842/2 "2025-02-04T22:12:18Z")

</div>

Thanks for reaching out, @Casper_Thrane. What is the current mapping of your `@timestamp` field? I had something similar happen when I accidentally used a string field.
