Posted By

theworldofdan on 07/21/11


Tagged


Versions (?)

MySQL datetime format using PHP


 / Published in: PHP
 

  1. <?php
  2. // Source: http://www.richardlord.net/blog/dates-in-php-and-mysql
  3. // populates $datetime with a valid MySQL DATETIME value
  4. $datetime = date('Y-m-d H:i:s');

Report this snippet  

You need to login to post a comment.