2

I've created a model that does several spatial joins based off of a lat/long in a table. In the table, I have a "Modified_date" which gives year, month, date, time. This model is set to run automatically every day at 6am and new informaiton gets appended to an dataset. I'm trying to create a query/expression that would use the "Modified_date" column to tell the model run from todays date and caputre everything that was posted in the last 24 hours. So, If it ran yesterday at 6am, it will run again at 6am, but I want to only capture the records created in the table from 6am to 6am.

2

I would use the Select tool and then write this expression: "Modified_date" >= CURRENT_DATE -1

It should return all your records greather than equal today minus 1 day (i.e. 24 hous), therefore yesterday at 6am.

It definitely works with the Definition Query SQL as we use it in our organisation to only view our "incidents" in the last fortnight: "INCIDENT_FROM_DATE" >= CURRENT_DATE -14

Try it! :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.