Solved! Go to Solution.
I'm getting aggravating results trying to query a date time field in a fgdb...
If I use this:
"gpstime" > date '2011-06-14 10:00:00' AND "gpstime" < date '2011-06-14 11:00:00'
in the select by attributes dialog in arcmap it works fine, but using it as the whereclause in
arcpy.SelectLayerByAttribute i get the wrong times.
ideas?
query = "\"gpstime\" > date '2011-06-14 10:00:00' AND \"gpstime\" < date '2011-06-14 11:00:00'" arcpy.SelectLayerByAttributes_management(lyr, "NEW_SELECTION", query)