CURRENT_DATE function on ArcSDE SQL Server Database not working

3973
1
Jump to solution
02-02-2015 10:30 AM
GeoffreyWest
Occasional Contributor II

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
Occasional Contributor II

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

View solution in original post

0 Kudos
1 Reply
GeoffreyWest
Occasional Contributor II

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

View solution in original post

0 Kudos