Posted By

daipratt on 11/30/10


Tagged

mysql


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

zack


MySQL UNIX timestamp to readable date


 / Published in: MySQL
 

URL: http://daipratt.co.uk

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 users.name, 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.