phead

Selecting dates in .GDB

Discussion created by phead on Jul 26, 2011
Forgive me if this sounds confusing.
I am attempting to build a sequel query to select records that that were filed 120 days from the current date. I have read the ESRI post explaining how to build the query in a personal database like below:

[FIELD_NAME] between Date () and DateAdd ( "d", -120, Date())
Since .gdb's don't accept the regular sql syntax this will not work.

I am working with a .gdb and have gotten as far as:
"FIELD_NAME"<Current_Date

The above will return records in my query. I am looking to select only the dates 120 days from the current date.
So I tried "FIELD_NAME"<Current_Date-120
..no luck.

This query will reside in a model that I'm building, so the point is to NOT have to enter in the current date every time I run the model. Also, this is a very large dataset so I am desperately trying to avoid the "create field" calculate from current date etc method..I'm really hoping I'm missing something small and minor as that is usually the case.
Any help would be GREATLY appreciated..

-Paul H.
Houston, TX

Outcomes