I'm querying 2 datetime fields from a MSSQL database.

The format returned is 'Jul 06 2002 01:57PM' or similar.

I then try to do a comparison in PHP, to see if one is greater than the other.

The problem is that PHP believes 'Jul 06 2002 12:43PM' is greater than 'Jul 06 
2002 01:08PM', which is obviously not true.  Assuming that the first value 
mentioned is $var1, and the second $var2, here's how I'm comparing:

if ($var1 > $var2) {
        echo $var1.' is greater than '.$var2;

Thanks in advance,

Casey Allen Shobe / Network Security Analyst & PHP Developer
SecureWorks, Inc. / 404.327.6339 x169 / Fax: 404.728.0144
[EMAIL PROTECTED] / http://www.secureworks.net
Content is my own and does not necessarily represent my company.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to