MySQL 날짜 쿼리 From_unixtime

$q = "select * from TABLE where FROM_UNIXTIME(tt,’%Y%m%d’)=’$mtt’ ";

 

http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_from-unixtime

mysql> SELECT FROM_UNIXTIME(1196440219);
-> ‘2007-11-30 10:30:19’
mysql> SELECT FROM_UNIXTIME(1196440219) + 0;
-> 20071130103019.000000
mysql> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(),
-> ‘%Y %D %M %h:%i:%s %x’);
-> ‘2007 30th November 10:30:59 2007’

You may also like

댓글 남기기