Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

MySQL datetime format

use Datetime;

$now = new DateTime();
echo $now->format('Y-m-d H:i:s');    // MySQL datetime format
echo $now->getTimestamp();           // Unix Timestamp -- Since PHP 5.3
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #MySQL #datetime #format
ADD COMMENT
Topic
Name
5+8 =