I tried to do a query in Elasticsearch via python. I want to get all values in the last one hour from now. For this I wrote this script:
import time
from elasticsearch import Elasticsearch
from datetime import datetime, timedelta
es = Elasticsearch()
index = "standalone"
filename = "2017-12-22V2.csv"
Timestamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
one_hour_from_now = datetime.now() - timedelta(hours=1)
one_hour_from_now = one_hour_from_now.strftime('%Y-%m-%d %H:%M:%S')
query = {"query":{"bool":{"must":{"range":{"Time":{"gt":one_hour_from_now,"lt":Timestamp}}},"must_not":[],"should":[]}},"from":0,"size":10,"sort":[],"aggs":{}}
ret = es.search(index, body=query)
print("ret", ret)
When I execute it I get this error:
es.search exception: TransportError(400, 'search_phase_execution_exception', 'failed to parse date field [2018-02-12 15:50:26] with format [strict_date_optional_time||epoch_millis]')
This is the structure of my ES index:

Can someone help me please
Thank you