Posted By

daipratt on 11/30/10



Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


MySQL UNIX timestamp to readable date

 / Published in: MySQL


Convert a Drupal time stamp field into a readable format. The Drupal time stamp field is in the UNIX format.

  1. //For example
  2. SELECT, pnts.points, FROM_UNIXTIME(pnts.time_stamp,'%Y %D %M %h:%i:%s') AS DATE, pnts.description, pnts.reference, pnts.operation, users.mail
  3. FROM userpoints_txn pnts
  4. LEFT JOIN users users ON users.uid = pnts.uid
  5. WHERE 1

Report this snippet  

You need to login to post a comment.