You are here: Re: Times « PHP Programming Language « IT news, forums, messages
Re: Times

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация