Mysql Unix-Timestamp Date Format

In mysql database, I store the date column as unix-timestamp format (ex: 1264105904 ). I want to convert this date to datetime as "Oct 11, 2011 6:25 am PDT" in a select statement. How can I achieve this?

+7
source share
1 answer
 select date_format(from_unixtime(1264105904),'%b %d, %Y %l:%i %p PDT'); 

should do what you want

+17
source

All Articles