Select to view content in your preferred language

CURRENT_DATE function on ArcSDE SQL Server Database not working

4672
1
Jump to solution
02-02-2015 10:30 AM
GeoffreyWest
Frequent Contributor

SDE_CURRENT_DATE.PNGI 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. PlannedDate = GETDATE () does not work either, however no errors are being returned.

 

The data is my table is m/d/yyyy The data when selecting by attribute is yyyy-mm-dd.

1 Solution

Accepted Solutions
GeoffreyWest
Frequent Contributor

Figured it out, PlannedDate = CONVERT(DATE, GETDATE())

View solution in original post

0 Kudos
1 Reply
GeoffreyWest
Frequent Contributor

Figured it out, PlannedDate = CONVERT(DATE, GETDATE())

0 Kudos