Re: TIMESTAMP -> Y-m-d

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

 



nabil wrote:
Please help me how to print a timestamp string retrived from the database,
and print it as YYYY-MM-DD

use the mysql date_format fumction


DATE_FORMAT(date,format)

select date_format(date_field, '%Y-%m-%d') from data;

see the mysql docs for more details

--

Sean


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