How to Query the data between 2 different timestamp

How to query the data between 2 different timestamps?
We have a data. I am able to query through Kibana Discover tab. But i am not able to query through devTools or Curl command.

Following is my devtool command

GET _all/_search
  "query": {  
    "range": {
        "boost": 1,
        "gt": "2021-06-14T00:00:00",
        "lt": "2021-06-15T00:00:00"


The query looks good.
Check that you don't have a typo, like timestamp vs @timestamp.
Check that the data actually exists.
Check if you have an issue with timezones. Remember that if you don't give the timezone, Elasticsearch will assume UTC time.

If finally it does not work, could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can copy and paste in Kibana dev console, click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

1 Like

Thanks @dadoonet ... @timestamp is working for me.

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