RE: Converting Dates...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I need help.  I need to convert a Date column in MySQL where the date
is
> stored like "2003-01-15" to the following seconds "1042621252 ". 

SELECT TO_UNIXTIME(date_column) AS formatted_column FROM yourtable WHERE
...

The TO_UNIXTIME() function will convert the date to the format you need
that is accessible in the "formatted_column" column of the result set.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux