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

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]


Удаленная работа для программистов  •  Как заработать на 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

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