Created
September 1, 2010 16:03
-
-
Save gavinblair/560920 to your computer and use it in GitHub Desktop.
Convert timestamp to readable date right in MySQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT date_format(FROM_UNIXTIME(u.access), '%Y %M %D') FROM users u ORDER by u.access DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Formatting instructions: http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-format