Jump to content

insert 0000-00-00 into date field


reece_1989

Recommended Posts

how would i insert a blank date 0000-00-00 into my db?

 

i have an update form that correctly converts from dd-mm-yyyy to yyyy-mm-dd:

 

$Time26 = strtotime($update_T26);
$Date26 = date('Y-m-d',$Time26);

 

 

If i enter 0000-00-00 via phpmyadmin i get: 30-11--0001  displayed when converting the date in php page

 

And if i enter nothing or 00-00-0000 in php page  in the db i get: 31-12-1969

 

??? any ideas

 

Cheers  :)

 

Link to comment
https://forums.phpfreaks.com/topic/168109-insert-0000-00-00-into-date-field/
Share on other sites

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.