PHP format mysql date


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



Copy this code and paste it in your HTML
  1. function format_date($original='', $format="%d.%m.%Y")
  2. {
  3.  
  4. return (!empty($original) ? strftime($format, strtotime($original)) : "" );
  5.  
  6. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.