Re: Subtracting times?

From: Date: Sun, 24 Jun 2001 00:20:13 +0000
Subject: Re: Subtracting times?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9782@lists.php.net to get a copy of this message
check out http://www.php.net/manual/en/function.mktime.php If you still need assistance, I'm here. On Sun, 24 Jun 2001, Matthew Cothier wrote: > I really need help here. What I am trying to do is the following. > > ------------- > > $today = date("m.d.y"); > $time = date("g:i a"); > > if($row[3] == $today){ > > if(($row[4] < $time) and ($time < $row[6])){ > > print("Now Showing"); > > } else { > > print("Today at $row[4]"); > > } > > } else { > > print("$row[3] at $row[4]"); > > } > > ------------------------ > > $row[3] --> Date stored in database i.e 06.23.01 > $row[4] --> Start time stored in database i.e 7.00 pm > $row[6] --> End time stored in database i.e 7.30 pm > > > > > My problem is that when it looks for the difference in time it works fine > with say : > > start time = 7:00 pm > end time = 8:00 pm > > But as soon as I go into: > > start time = 7:00 pm > end time = 7.35 pm > > it mucks up! > > > Please help!! What do I need to do? > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at > http://www.hotmail.com. > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#9782) next »