Select by Attributes Where Clause how to get current date?

المشرف العام

Administrator
طاقم الإدارة
I am trying to build a where clause for a select by attributes operation in ArcGIS. I have a feature class that has a date field that has dates in it. I wish to construct a where clause that selects records from 65 years ago or more. I want this to be generic, where the clause computes the 65 years from whatever today's date is without actually entering today's date. In other words, I do NOT want to enter something for a where clause like this:

"date_field" >= date '1945-09-22'I want to have a where clause like this:

"date_field" >= curdate() - 65 yearsThe problem is that I can't figure out how to write this where clause. There is nothing in the ArcGIS documentation on composing where clauses with dates that includes obtaining the current date programmatically as opposed to entering a specific date.

Help? Any input is appreciated.



أكثر...
 
أعلى