Jump to content

[SOLVED] Newb Question About Datetime


uwannadonkey

Recommended Posts

your probably refering to the format.  the format that you see, 0000-00-00 00:00:00, is YYYY-MM-DD HH:MM:SS.

 

for simplicity, let's use date() (and the current local time): date ("Y-m-d H:i:s");.

 

don't forget to insert the TIME(datetime) as string, ie:

$sql = "INSERT INTO ... values (..., '" . date ("Y-m-d H:i:s") . "')"

 

regards.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.