Select to view content in your preferred language

query feature layer date field

249
0
08-04-2022 03:14 AM
GuyShaharabani
Emerging Contributor

I'm trying to query a feature layer by a date field, and there is a problem with the 'less then' operator.

it is not a code problem, I'm trying to query in the feature layer rest.

this query works: 

 

CreatedTime > TIMESTAMP '2022-01-01 15:30:00'

 

but this query does not:

 

CreatedTime < TIMESTAMP '2022-01-01 15:30:00'

 

 

this is the field:

GuyShaharabani_0-1659607512256.png

 

and just to be clear.. there are rows that match both conditions.

I Don't know if this has anything to do with it but this is the SQL field:

GuyShaharabani_1-1659607700421.png

 

 

I've tried to use between, sometimes it works and sometimes it doesn't(working example):

 

CreatedTime Between TIMESTAMP '2022-07-28 00:00:00' AND TIMESTAMP '2022-07-28 23:59:59'

 

 

 an example of a query that have no results, that does have results in sql server:

 

CreatedTime Between TIMESTAMP '2021-07-01 11:00:00' AND TIMESTAMP '2022-07-06 11:00:00'

 

 

0 Kudos
0 Replies