# How i can get timestamp?

**URL:** https://discuss.elastic.co/t/how-i-can-get-timestamp/262777
**Category:** Elasticsearch
**Created:** [February 1, 2021, 3:20am UTC](https://discuss.elastic.co/t/how-i-can-get-timestamp/262777 "2021-02-01T03:20:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Ricky\_Alamsyah](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ricky_alamsyah/32/83183_2.png) [@Ricky\_Alamsyah](https://discuss.elastic.co/u/Ricky_Alamsyah)
#### Post date: [February 1, 2021, 3:20am UTC](https://discuss.elastic.co/t/how-i-can-get-timestamp/262777/1 "2021-02-01T03:20:31Z")

</div>

how i can get range timestamp with format epoch\_millis ?

"mappings": {  
"properties": {  
"@timestamp": {  
"type": "date"  
},

i try this but not working  
{  
"query":{  
"bool": {  
"must": [{  
"match\_all": {} }],  
"filter": {  
"range": {  
"@timestamp":{  
"gte": "now-5m"}}  
}  
}  
}

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 1, 2021, 3:27am UTC](https://discuss.elastic.co/t/how-i-can-get-timestamp/262777/2 "2021-02-01T03:27:05Z")

</div>

Welcome to our community! 😃

Just to be clear, are you trying to get a response from Elasticsearch in that format?

---

<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 1, 2021, 3:27am UTC](https://discuss.elastic.co/t/how-i-can-get-timestamp/262777/3 "2021-03-01T03:27:41Z")

</div>

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