Adding hour and minute information 
Author Message
 Adding hour and minute information

Hello,

I need to write a line of code that basically will say :
"if the time is 8:30am then echo.....

I can get the 8am to work ok but how do I make the 30 minute part sit
with the 8am in the code?

$hour= date ("H"); //work out the hour of day
$day= date ("D"); //work out the day of the week
$minutes =date ("i"); //work out the minute in the hour



Sat, 29 Oct 2005 11:32:02 GMT  
 Adding hour and minute information
Wouldn't this work:

$time = date('Hi',time()); // get the current time, formatted to 24 hour
format
if($time == "0830") {
    echo "It's 8:30am";

Quote:
}



Quote:
> Hello,

> I need to write a line of code that basically will say :
> "if the time is 8:30am then echo.....

> I can get the 8am to work ok but how do I make the 30 minute part sit
> with the 8am in the code?

> $hour= date ("H"); //work out the hour of day
> $day= date ("D"); //work out the day of the week
> $minutes =date ("i"); //work out the minute in the hour



Sat, 29 Oct 2005 11:43:47 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. time: hours, minutes, seconds?

2. Elapsed Time Spin - Hours & Minutes

3. Hours:Minutes:Seconds Control

4. Convert seconds in minutes, hours, days, years ...

5. Adding Hour:Min:Second strings..?

6. Product Update CWRES 2.0 - Add version information to Clarion EXEs

7. Add version information to your Clarion EXEs

8. adding information with EAI

9. Adding/Changing expiration and serial information in programs

10. Cannot Add Header Information Error

11. Cannot add header information

12. how to add information to an edge?

 

 
Powered by phpBB® Forum Software