Mysql Timestamp to PHP data


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



Copy this code and paste it in your HTML
  1. echo date("F j, Y g:i a", strtotime($row["date"])); // October 5, 2008 9:34 pm
  2. echo date("m.d.y", strtotime($row["date"])); // 10.05.08
  3. echo date("j, n, Y", strtotime($row["date"])); // 5, 10, 2008
  4. echo date("Ymd", strtotime($row["date"])); // 20081005
  5. echo date('\i\t \i\s \t\h\e jS \d\a\y.', strtotime($row["date"])); // It is the 5th day.
  6. echo date("D M j G:i:s T Y", strtotime($row["date"])); // Sun Oct 5 21:34:02 PST 2008

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.