# Overwrite @timestamp to different format

**URL:** <https://discuss.elastic.co/t/overwrite-timestamp-to-different-format/119218>\
**Category:** Logstash\
**Created:** [February 9, 2018, 10:59am UTC](https://discuss.elastic.co/t/overwrite-timestamp-to-different-format/119218 "2018-02-09T10:59:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![moriol](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@moriol](https://discuss.elastic.co/u/moriol)\
**Post date:** [February 9, 2018, 10:59am UTC](https://discuss.elastic.co/t/overwrite-timestamp-to-different-format/119218/1 "2018-02-09T10:59:06Z")

</div>

I am wondering can I change the format of the default @timestamp field, to be in milliseconds?  
I see I can create new field called "time", copy @timestamp to it, and then convert to milliseconds and my time value displays my time in milliseconds.  
If I copy the contents of time(in milliseconds) to @timestamp, Logstash fails.

I am wondering if @timestamp format is changeable, or does it need to stay as it is?

---

<div class="post-metadata">

**Author:** ![rcowart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rcowart/32/88091_2.png) [@rcowart](https://discuss.elastic.co/u/rcowart)\
**Post date:** [February 9, 2018, 1:11pm UTC](https://discuss.elastic.co/t/overwrite-timestamp-to-different-format/119218/2 "2018-02-09T13:11:32Z")

</div>

@timestamp is of type `date` in Elasticsearch. A date type is...

> Internally, dates are converted to UTC (if the time-zone is specified) and stored as a long number representing milliseconds-since-the-epoch.

So @timestamp already supports millisecond granularity. You must however fill it with a source that provides millisecond granularity.

---

<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:** [March 9, 2018, 1:11pm UTC](https://discuss.elastic.co/t/overwrite-timestamp-to-different-format/119218/3 "2018-03-09T13:11:49Z")

</div>

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