Hi.
I'm trying to execute and SQL query with datetime condition on a geodatabase, but an Exception ('An invalid SQL statement was used.') is thrown. The code is bellow:
var sqlStatement = "SELECT * FROM TableName WHERE Edited > '15.9.2014 14:28:58'";
foreach (Row row in geodatabase.ExecuteSQL(sqlStatement))
{
var temp = row.GetGlobalID();
Console.Write(temp);
}
Okay, there is someting wrong with SQL statement (the WHERE part), but how can I write it correctly? I there a problem in Datetime format? Or is that kind of query even possible with File Geodatabase API (using version 1.3)?
Solved! Go to Solution.
Try:
"SELECT * FROM TableName WHERE Edited > date '15.9.2014 14:28:58'"
Try:
"SELECT * FROM TableName WHERE Edited > date '15.9.2014 14:28:58'"