Scusate anticipatamente la niubbaggine.
Devo contare i "CAVOLI" delle ultime 3 ore
<?
global $connect;
$ora = date('d-m-Y H:i');
$base = strtotime($ora);
$menotre = strtotime("-4 hours",$base);
$essequelle = odbc_exec($connect,"SELECT DS_ENTE_DES,COUNT(*) FROM CAVOLI WHERE DT_APERTURA BETWEEN '$menotre' AND '$base' GROUP BY DS_CAVOLETTI");
echo etc etc
?>

mi da
Warning: odbc_exec() [function.odbc-exec]: SQL error: [DataDirect][ODBC Sybase Wire Protocol driver][SQL Server]Syntax error during implicit conversion of VARCHAR value '1192015800' to a DATETIME field. , SQL state HY000 in SQLExecDirect in C:\xampp\htdocs\3.php sulla linea del WHERE

Dove sbaglio? è tutto il giorno che mi martello le pelotas