Jump to content

How can I compare time in format HH:MM?


Recommended Posts

I have the time time now viewed as 17:11.

The time $Start_Time is 17:00. The time $End_time is 18:00.


Can I use this to check if time is in between starttime and endtime? Or do I have to convert it to other formats before it understand that I'm comparing it as times and not just numbers?

if($Start_Time < $Now_time && End_Time > $Now_time){

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.