Skip to content

Instantly share code, notes, and snippets.

@mdurys
Created December 4, 2014 11:06
Show Gist options
  • Select an option

  • Save mdurys/073044b9285cbc3d1c88 to your computer and use it in GitHub Desktop.

Select an option

Save mdurys/073044b9285cbc3d1c88 to your computer and use it in GitHub Desktop.
Format Unix timestamp in a MySQL query
SELECT
DATE_FORMAT(FROM_UNIXTIME(p.updated_at), '%Y-%m-%d') AS updated_at
FROM product p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment