# Date field with unix timestamp for date histogram

**URL:** <https://discuss.elastic.co/t/date-field-with-unix-timestamp-for-date-histogram/11876>\
**Category:** Elasticsearch\
**Created:** [May 8, 2013, 2:07pm UTC](https://discuss.elastic.co/t/date-field-with-unix-timestamp-for-date-histogram/11876 "2013-05-08T14:07:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin\_Verlangen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robin_verlangen/32/1542_2.png) [@Robin\_Verlangen](https://discuss.elastic.co/u/Robin_Verlangen)\
**Post date:** [May 8, 2013, 2:07pm UTC](https://discuss.elastic.co/t/date-field-with-unix-timestamp-for-date-histogram/11876/1 "2013-05-08T14:07:45Z")

</div>

Hi there,

I want to put a date mapping on a field that is actually a long unix  
timestamp (in seconds). I came across this question at Stack Overflow

> <https://stackoverflow.com/questions/10716435/elasticsearch-index-unix-timestamp>

  
but  
I can't find the right date format (epoch timestamp) here  
[http://www.elasticsearch.org/guide/reference/mapping/date-format/](http://www.elasticsearch.org/guide/reference/mapping/date-format/) .

Apart from that I would prefer storing the seconds, instead of  
milliseconds. However the latter would be something I can overcome.

Who can help me out?

Best regards,

Robin Verlangen  
_Data Architect_  
\*  
\*  
W [http://www.robinverlangen.nl](http://www.robinverlangen.nl)  
E robin@us2.nl

[http://goo.gl/Lt7BC](http://goo.gl/Lt7BC)

Disclaimer: The information contained in this message and attachments is  
intended solely for the attention and use of the named addressee and may be  
confidential. If you are not the intended recipient, you are reminded that  
the information remains the property of the sender. You must not use,  
disclose, distribute, copy, print or rely on this e-mail. If you have  
received this message in error, please contact the sender immediately and  
irrevocably delete this message and any copies.

--  
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:37am UTC](https://discuss.elastic.co/t/date-field-with-unix-timestamp-for-date-histogram/11876/2 "2017-07-06T02:37:37Z")

</div>


