1

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

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Feb 2, 2015 at 18:18
2
  • 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. Commented Feb 2, 2015 at 20:02
  • Please always include error messages as text rather than pictures. That way they are available to future searches. Commented Jun 19, 2016 at 8:41

2 Answers 2

1

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

PlannedDate = CONVERT(DATE, GETDATE())
answered Feb 2, 2015 at 23:04
0

I had the same problem. Simply replace

datetimestart >=CURRENT_DATE -1

with

datetimestart >=GETDATE()-1
ArMoraer
5,7493 gold badges27 silver badges52 bronze badges
answered Jun 19, 2016 at 4:04

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.