How to get feature with latest date in a polygon

Discussion created by agray1 on May 30, 2011
Latest reply on May 31, 2011 by agray1
I have a problem where I need to get the polygon feature from a featureclass that overlaps a polygon and that has the latest or maximum date.  The featureclass has a date field.  Data statistics won't work because it requires a numeric field.  An  iQueryDef won't work because that does not allow me to spatial query it.  A Spatial SQL could be an option but I would have to research it.  The geometry I need to filter is not stored in the database.  I don't know if I can stick a whole select clause in a where clause, but ArcObjects tends to not like any complex query like that. 

Just to make the matter slightly more complicated, I need to do some filtering on some attributes also.