This is a discussion on A Tricky Time Calculation within the PHP General forums, part of the PHP Programming Forums category; Hi, Given the time range: 09:15 - 17:30 how can I tell how many 15 minute intervals occur between ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
Given the time range: 09:15 - 17:30 how can I tell how many 15 minute intervals occur between these two times? Obviously here I can work it out, but I need a calculation that will perform the maths for any two time ranges... Thanks for your help |
|
|||
|
On Sun, Nov 23, 2003 at 03:42:58PM -0000, Shaun wrote:
: : Given the time range: 09:15 - 17:30 how can I tell how many 15 minute : intervals occur between these two times? Obviously here I can work it out, : but I need a calculation that will perform the maths for any two time : ranges... $time1 = '09:15'; $time2 = '17:30'; $intervals = floor((strtotime($time2) - strtotime($time1)) / 900); |