sql server - php to call MSSQL query and compare two dates? -
sql server - php to call MSSQL query and compare two dates? - ahoy there all, bit stuck , need help. i calling external mssql (not mysql) database linux server , display results after today's date. here code: $today = date("y-m-d");// current date $date = strtotime(date("y-m-d", strtotime($today))); $todaysdate = date( 'm j y g:i:s:000a', $date ); //converts mssql standards $query = "select dateofarrival atable dateofarrival > '". $todaysdate ."'"; when run query, displays results, doesn't give flying hoot where. i guessing because comparing date string? not sure on 1 though. any thoughts? give thanks in advance! update: here echoed query string. $query = "select dateofarrival atable dateofarrival > 'jan 10 2012 12:00:00:000am'"; date examples stored in db: feb 28 2004 12:00:00:000am oct 14 2009 12:00:00:000am may 18 2011 12:00:00:000am apr 10 2012 12:00:00:000am...