Posted By

TimFletcher on 04/28/08


Tagged

mysql now


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

JimiJay
rubensarrio
vali29
umang_nine


PHP version of MYSQL NOW()


 / Published in: PHP
 

URL: http://dream.adeli.ca

Gets the present time and date in PHP and formats it for input into a MYSQL database DATETIME field

  1. $now = date('Y-m-d H:i:s', time())

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: jaytee on April 28, 2008

you could get the same result by omitting the second parameter, which defaults to time()

You need to login to post a comment.