# Timestamp vs unixtime

**URL:** https://discuss.elastic.co/t/timestamp-vs-unixtime/13456
**Category:** Elasticsearch
**Created:** [September 4, 2013, 11:44am UTC](https://discuss.elastic.co/t/timestamp-vs-unixtime/13456 "2013-09-04T11:44:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Alexis\_Okuwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexis_okuwa/32/1983_2.png) [@Alexis\_Okuwa](https://discuss.elastic.co/u/Alexis_Okuwa)
#### Post date: [September 4, 2013, 11:44am UTC](https://discuss.elastic.co/t/timestamp-vs-unixtime/13456/1 "2013-09-04T11:44:23Z")

</div>

I wanted to know if there was any elasticsearch magic that happened with  
timestamps vs unixtime. I find it pretty easy to use timestamps and just  
use interger math from there. It also makes range queries and the amount of  
time between to points pretty easy to figure out. Is there any reason to  
use a timestamp in elasticsearch instead of just an int for unixtime?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [September 4, 2013, 11:57am UTC](https://discuss.elastic.co/t/timestamp-vs-unixtime/13456/2 "2013-09-04T11:57:40Z")

</div>

You can enable automatic timestamping  
[http://www.elasticsearch.org/guide/reference/mapping/timestamp-field/](http://www.elasticsearch.org/guide/reference/mapping/timestamp-field/) and  
in queries, you can pass date formats, and let ES do the conversion.

Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Alexis\_Okuwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexis_okuwa/32/1983_2.png) [@Alexis\_Okuwa](https://discuss.elastic.co/u/Alexis_Okuwa)
#### Post date: [September 4, 2013, 12:45pm UTC](https://discuss.elastic.co/t/timestamp-vs-unixtime/13456/3 "2013-09-04T12:45:01Z")

</div>

Jorg,

Currently since my time is based to a minute i am using what i call logTime  
which is round(unixtime/60)

On Wed, Sep 4, 2013 at 4:57 AM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<[joergprante@gmail.com](mailto:joergprante@gmail.com)

> wrote:

> You can enable automatic timestamping  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/timestamp-field/) and  
> in queries, you can pass date formats, and let ES do the conversion.
> 
> Jörg
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/veT4QuHHJxw/unsubscribe](https://groups.google.com/d/topic/elasticsearch/veT4QuHHJxw/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Enjoy,  
Alexis Okuwa  
WojonsTech  
424.835.1223

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:18am UTC](https://discuss.elastic.co/t/timestamp-vs-unixtime/13456/4 "2017-07-06T02:18:15Z")

</div>


