With OGR 1.10.1 this works:
ogrinfo test2.shp -sql 'SELECT COUNT(*) FROM test2 WHERE DATE < "1970-01-01"'
Note that DATE is a column of type date (not string).
(Here's test data if you want to try: http://ge.tt/6DBclJh/v/0)
The same query in 1.11.0 causes
OGR[3] error 1: Type mismatch or improper type of arguments to < operator.
Has the syntax changed or is this really a bug?
I filed a ticket, so in case this is a bug, I'm all set: http://trac.osgeo.org/gdal/ticket/5507
-dialect SQLite
to the query it works OK. Can you verify this?C:\temp\test>ogrinfo time.shp time -where "time<'1970-01-01'"
and "time<'1970/01/01'" is accepted too.