RE: [PHP] Comparing Times

From: Date: Thu, 29 Mar 2001 20:16:47 +0000
Subject: RE: [PHP] Comparing Times
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-46148@lists.php.net to get a copy of this message
You need to convert all the times you are comparing into a number such as seconds since the Unix epoch (Jan 1, 1970 I think). Then you can use the usual programming syntax to do what you want. Look here for more ideas: http://www.php.net/manual/en/function.time.php John > -----Original Message----- > From: Brian C. Doyle [mailto:bcdoyle@mindspring.com] > Sent: Thursday, March 29, 2001 1:57 PM > To: php-general@lists.php.net > Subject: [PHP] Compairing Times > > > Hello All, > > how do I compare 2 times. > What i want to do is > $time=date("H:i:s",mktime(0,1,03,0,0,0)); > IF ($time > 00:00:35) { echo "Too High"}; > > when I do this all i ever get is > Too High no matter what the value of time is > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#46148) next »