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

Posted by Good Man on 07/16/07 20:52

Rik <luiheidsgoeroe@hotmail.com> wrote in
news:op.tvkoaxivqnv3q9@metallium:

> On Mon, 16 Jul 2007 20:35:11 +0200, mtuller <mituller@gmail.com>
> wrote:
>
>> I have a database that stores time in 2 different formats. I have a
>> unix timestamp, and the other is a representation of time in the
>> format 03:00:00 which would represent 3 hrs. I want to convert the 3
>> hrs so that I can add it to the unix timestamp. In other words,
>>
>> The unix timestamp of 1183553400 is equal to Wed, Jul 04, 2007 7:50
>> AM. I want to add the 3hrs to be able to display in this format
>>
>> Wed, July 04, 2007 7:50 AM - 10:50 AM.
>>
>
> You made it somewhat difficult for yourself.
> Here is how it would be done in MySQL alone (untested, fields named
> 'date' and 'time'):

whoever uses the code would probably wise to use differently named fields -
'date' and 'time', while they work, should probably be avoided.

http://dev.mysql.com/doc/refman/4.1/en/reserved-words.html

 

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

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