Reply to Re: Convert datetime to unix timestamp

Your name:

Reply:


Posted by Aggelos on 10/23/06 20:12

> In PHP, you could use strtotime(), but if the data comes from a database I
> strongly recommend to let the database handle it.
> --
> Grtz,
>
> Rik Wasmus
The datetime in the database is stored from PHP using date(Y-m-d H:i:s)
so when I pull it from MySQL database
I am expecting to convert it from Datetime format to Unixtimestamp.
I found a function in PHP.net str2time it is in the second post from
the top
http://uk.php.net/manual/en/function.mktime.php#67996

Thats how I do it now.
But I don't understand what can be different in PHP from MySQL built in
function.
All they have to do is add seconds since 1/1/1970 plus the current time
seconds.

Thanks for your post anyway. :)

[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

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