CpHpristian Posted June 12, 2009 Share Posted June 12, 2009 How can I convert a SQL timestamp (e.g. 2009-06-12 20:23:26) into a nicer format like dd-mm-yyyy? Thanks for your help!! Link to comment https://forums.phpfreaks.com/topic/161968-solved-timestamp-to-date/ Share on other sites More sharing options...
PFMaBiSmAd Posted June 12, 2009 Share Posted June 12, 2009 In your SELECT query (fastest way) - http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format Using some slow parsed/tokenized/interpreted PHP code - date and strtotime Link to comment https://forums.phpfreaks.com/topic/161968-solved-timestamp-to-date/#findComment-854602 Share on other sites More sharing options...
CpHpristian Posted June 13, 2009 Author Share Posted June 13, 2009 Thank you! Apparently I am too stupid to put my SQL-query into the DATE_FORMAT. So I had to use date() instead. Link to comment https://forums.phpfreaks.com/topic/161968-solved-timestamp-to-date/#findComment-855168 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.