Hi,
Thanks for the reply. I wrote this using ArcGIS API Python
I followed according to your code:
portal_item = gis.content.search(query="title:tankers", item_type="Feature Layer")
flayer = portal_item[3]
tankers = flayer.layers[0]
from datetime import datetime
# Convert the string to a datetime object
FromDate = datetime.strptime(from_date_str, '%d-%b-%Y').isoformat(timespec='seconds')
ToDate = datetime.strptime(to_date_str, '%d-%b-%Y').isoformat(timespec='seconds')
time = f"closingdate >= {FromDate} AND closingdate <= {ToDate}"
# Query the feature layer
query_result = tankers.query(where=f"trip_name = {'MCC'} AND {time}")
But I got the following error message:
Exception: Unable to complete operation.
Query with count request failed.
(Error Code: 400)
where as in documentation, the syntax is different
query(where="trip_name='MCC'",time_filter=[<start_time>,<end_time>)
I tried the above one too, its not throwing any error but considering only first parameter in where clause not considering time_filter parameter.