2011-11-22 16 views
7

Nel database mysql memorizzo la colonna della data come formato unix-timestamp (ad esempio: 1264105904). Voglio convertire questa data in datetime come "Oct 11, 2011 6:25 am PDT" nell'istruzione select. Come posso raggiungere questo obiettivo?Mysql Unix-Timestamp Formato data

risposta

17
select date_format(from_unixtime(1264105904),'%b %d, %Y %l:%i %p PDT'); 

dovrebbe fare quello che vuoi

+0

Si works.Thanks molto. –