PHP and MySQL Time

A lot is said about PHP and MySQL time storage and formatting. I don’t want to say any of it.

What worked for me was using the DATETIME field in MySQL – which will give me the benefit of running server side time-aware queries.

And converting to a nicely formatted time within PHP.

date('F j, Y, g:i a',strtotime($mysqFieldValue))

Obvious isn’t it….

Leave a Reply