I am writing a script to access data from each day. I would like to select by attribute and send these features to a local file geodatabase. After reading some documenation, CURRENT_DATE is the function which reads data for today.

This is an example of my data '2015-02-02 00:00:00'. I don't have the time for any features, so in reality it is only YYYY-MM-DD. In a local file geodatabase, the query

PlannedDate = CURRENT_DATE works. However in my ArcSDE SQL Server connection it does not.

enter image description here

  • 1
    Date handling is notoriously different by database provider. You can't use a file geodatabase construct on a Microsoft database; you must use a Microsoft equivalent. – Vince Feb 2 '15 at 20:02
  • Please always include error messages as text rather than pictures. That way they are available to future searches. – PolyGeo Jun 19 '16 at 8:41

This function requires SQL Server Syntax for the mm/dd/yyyy format.


I had the same problem. Simply replace

datetimestart >=CURRENT_DATE -1


datetimestart >=GETDATE()-1

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.