|
Posted by Matthew Bates on 06/26/05 02:06
Andy Hassall wrote:
> On Sat, 25 Jun 2005 22:07:22 GMT, Matthew Bates <mattybates@hotmail.com> wrote:
>
>
>>I'm currently storing start and end times (hh:mm:ss) for shows in a
>>radio schedule using MySQL and processing the data with PHP.
>>
>>I need to add one second to the end time to ensure it is formatted
>>correctly (e.g. 09:29:59 to 9:30am) however I just cannot see how to do
>>it *correctly* - with PHP or MySQL. I may well be overlooking something
>>but I would be grateful if anybody could help and point me in the right
>>direction.
>
>
> mysql> select d, d + INTERVAL 1 SECOND from t;
> +---------------------+-----------------------+
> | d | d + INTERVAL 1 SECOND |
> +---------------------+-----------------------+
> | 2005-06-25 09:29:59 | 2005-06-25 09:30:00 |
> +---------------------+-----------------------+
> 1 row in set (0.00 sec)
>
I thought that was the case however I'm not storing dates, I'm storing
times as the times can relate to any weekday/weekend day (e.g. 9:30:00
on a Saturday is programme x, 10:30:00 is programme y..).
Navigation:
[Reply to this message]
|