i tried to use this sql:
SELECT date_format(signdate , '%Y-%c-%d %h:%i:%s' ) as post_date ,
date_format(NOW(), '%Y-%c-%d %h:%i:%s' ) as post_date_gmt
FROM `article` where outkey = 'Y'
the result of post_date is null, but post_date is working. so how can i use the funciton date_format to format signdate (ex: signdate is 1095959971)?
DATE_FORMATexpects aDATETIMEcolumn.You’d have to cast it:
It would be better to have a real DATETIME field, though.