Posted by Andy Hassall on 06/26/05 01:59
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)
--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Navigation:
[Reply to this message]
|