Derive Age of a MySQL tuple in minutes


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

Say you want to add on a mysql_fetch_assoc the age of a post or the tuple in minutes, use this.


Copy this code and paste it in your HTML
  1. ...
  2. TIMESTAMPDIFF(MINUTE,<datetime_attribute>,NOW()) AS age
  3. ...

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.