MySQL UNIX timestamp to readable date


/ Published in: MySQL
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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

URL: http://daipratt.co.uk

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.