I cannot, for the life of me, select timestamp data between two dates.
I can get all the data:
$sql = "SELECT * FROM DATE_TABLE";
I can order the data and limit the row count:
$sql = "SELECT * FROM DATE_TABLE ORDER BY DATE_TIME DESC LIMIT TO 30 ROWS";
All of the following requests fail however:
$sql = "SELECT * FROM DATE_TABLE WHERE DATE_TIME BETWEEN '01-Jan-2012' AND '17-Jan-2012'";
$sql = "SELECT * FROM DATE_TABLE WHERE DATE_TIME BETWEEN '01/01/2012' AND '01/17/2012'";
$sql = "SELECT * FROM DATE_TABLE WHERE DATE_TIME BETWEEN '01-Jan-2012 08:23:27.00' AND '17-Jan-2012 08:32:27.00'";
Data echoed is in the format: 17-Jan-2012 08:23:27.00
Data as shown in database is in the following format: 2012011614292300
Error message received for all BETWEEN requests:
SQL error: [Oracle][ODBC][Rdb]%SQL-F-UNSDATXPR, Unsupported date expression -SQL-F-DATEEQLILL, Operands of date/time comparison are incompatible
Any help?