Reply to Re: Date conversions

Your name:

Reply:


Posted by Michael Fesser on 07/16/07 18:52

..oO(mtuller)

>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,

Why not simply store the date in a real DATETIME field? You can always
use UNIX_TIMESTAMP() if you need it. Then all you need would be to call
ADDTIME() to add both values.

If converting the column is not an option, use FROM_UNIXTIME() before
calling ADDTIME().

HTH
Micha

[Back to original 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

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