Select to view content in your preferred language

Date value showing in milliseconds

279
2
03-13-2024 12:54 AM
Manager_HMWSSBCDC
New Contributor III

Manager_HMWSSBCDC_0-1710316276185.png

 

When I replaced query with objectid = 1 or anything, I'm getting the result but with recvddate column of Date data type I'm the getting the error that is in above pic.

When I run the script with objectid = 1, i had seen the column value of recvddate is in milliseconds format
like 

'recvddate': 1672511463000

My actual requirement is I want to filter all the records that are greater than some time value and delete those records.

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

in a file geodatabase?

SQL reference for query expressions used in ArcGIS—ArcGIS Pro | Documentation

 Here is an example of a query that will return all records on or after January 1, 2011, for a date-time field from a file geodatabase data source:

INCIDENT_DATE >= timestamp '2011-01-01 00:00:00'

 When a time that is not null is stored with the dates (for instance, January 12, 1999, 04:00:00), querying the date only will not return the record. When you pass only a date to a date-time field, it fills the time with zeros and retrieves only the records in which the time is 12:00:00 a.m.


... sort of retired...
Manager_HMWSSBCDC
New Contributor III

Not in file geodatabase. I want to run this on feature layer which is published in ArcGIS Portal and accessing the data through ArcGIS API for Python.

0 Kudos