AnsweredAssumed Answered

Data Definition to find rows from past 90 days

Question asked by ben_vk on Dec 7, 2017
Latest reply on Dec 11, 2017 by ben_vk

Hey, 

 

I am using ArcMap 10.5 with a table within our Enterprise SDE that has a join to a view (also in the SDE). This view has a date field that I would like to use to filter my data on. I need to find rows that were inspected in the past 90 days.

 

INS_DATE field properties:

An sample of my data:

 

tbl1.ObjectIDtbl1.AssetIDtbl1.Shape()tbl2.AssetIDtbl2.INS_DATE
110000100003/02/2016 11:34:52 AM
2100011000029/11/2017 8:37:12 AM
3100021000029/11/2017 1:45:23 PM

 

So I want to limit my rows to ones that have an INS_DATE within the past 90 days.

 

I have been trying to use the below code (and about a dozen variables of it) all give a non-descriptive error:

SDE_SPATIAL.GISADMIN.%AUDITS_LATEST_RECORD.INS_DATE > (GetDate() - 90)

 

 

Is there another way I should be approaching this one? 

 

Nathan Duncan FYI

 

Cheers

Ben

Outcomes