# \_timestamp format

**URL:** <https://discuss.elastic.co/t/-timestamp-format/17300>\
**Category:** Elasticsearch\
**Created:** [May 1, 2014, 2:37pm UTC](https://discuss.elastic.co/t/-timestamp-format/17300 "2014-05-01T14:37:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eunever32](https://avatars.discourse-cdn.com/v4/letter/e/e68b1a/32.png) [@eunever32](https://discuss.elastic.co/u/eunever32)\
**Post date:** [May 1, 2014, 2:37pm UTC](https://discuss.elastic.co/t/-timestamp-format/17300/1 "2014-05-01T14:37:34Z")

</div>

Hi

I am trying to format my \_timestamp to be in a human readable format

DELETE /twitter  
PUT /twitter  
PUT /twitter/tweet/\_mapping  
{ "tweet" :  
{  
"\_timestamp" :  
{ "enabled" : true, "store" : true, "format": "yyyy" }

}  
}  
PUT /twitter/tweet/1  
{  
"msg": "this is the tweet"  
}  
GET /twitter/\_search  
{  
"fields": ["\_timestamp", "\_source"]  
}

But it always appears as seconds since 1970

I can do something like this but that just overrides the contents of  
\_timestamp: what  
I want to do is use the contents of \_timestamp and format it.  
DELETE /twitter  
PUT /twitter  
PUT /twitter/tweet/\_mapping  
{ "tweet" :  
{  
"\_timestamp" :  
{ "enabled" : true, "store" : true, "format": "yyyy" , "path": "d"},  
"d": "date"

}  
}  
PUT /twitter/tweet/1  
{  
"msg": "this is the tweet",  
"d": "2014"  
}  
GET /twitter/\_search  
{  
"fields": ["\_timestamp", "\_source"]  
}

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6e6b1b24-c522-44b2-a570-b2ff3f088878%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6e6b1b24-c522-44b2-a570-b2ff3f088878%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:32am UTC](https://discuss.elastic.co/t/-timestamp-format/17300/2 "2017-07-06T01:32:18Z")

</div>


