I'm a web developer who works with HTML, PHP, CSS, ExpressionEngine, Javascript, jQuery, MySQL, SEO and UI/UX design. Always looking to learn new web related stuff, and a bit of a PC gamer. You can also find me on Twitter and LinkedIn.

Posts Tagged: mysql

Fix for MAMP when MySQL is not starting

This just helped me out, so this is for those having the same problem, but mainly posted here so I have a reference of it!

Text

Many, many times have I had to convert a MySQL timestamp (YYYY-MM-DD HH:MM:SS) into a more human readable format directly from a MySQL query. I’ve always done this with DATE_FORMAT.

Today, however, I needed to do something a little different. A Unix formatted timestamp held in the database needed to be converted to a human readable format.

And this is the answer I came across, the rather useful FROM_UNIXTIME.