My Blog

contains PHP and other web related content. (Sometimes there are some off topic things - don't freak out!)

Display unix timestamp in a date format in MySQL

Every once in a while, I forget about the built in awesomeness of MySQL. Today, I was looking at a unix timestamp from PHP in one of the fields and was wondering what that date was. Derr, use from_unixtime function!

1
SELECT from_unixtime(dateField) FROM tableName;

Tags:

Leave a Reply

  • twitter loader

Follow me on twitter: @aaronsaray

The views on this website are my own and do not reflect the opinions of my employer or clients.
Creative Commons License Home | Open Source | Book | Music | Art | Bio | Resume | Contact
My Baby