List:General Discussion« Previous MessageNext Message »
From:Nuno Oliveira Date:January 22 2007 9:32am
Subject:Re: Cannot convert value '0000-00-00 00:00:00' from column 4 to TIMESTAMP
View as plain text  
> The second major problem I am running into after the upgrade is the
> following error, which did not occur on Development.
> 
> Error Executing Database Query. Cannot convert value '0000-00-00
> 00:00:00'
> from column 4 to TIMESTAMP.
> The error occurred on line 8.
> MySQL version is: 5.0.27
> 
> Thanks in advance for any help.
> 

I don't know what/how are you doing and I don't even know enough about the 
subject but:

From PHP manual @ http://pt.php.net/manual/en/function.strtotime.php:
Note: The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 
GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond 
to the minimum and maximum values for a 32-bit signed integer.) Additionally, 
not all platforms support negative timestamps, therefore your date range 
may be limited to no earlier than the Unix epoch. This means that e.g. dates 
prior to Jan 1, 1970 will not work on Windows, some Linux distributions, 
and a few other operating systems. PHP 5.1.0 and newer versions overcome 
this limitation though.

From MySQL manual @
http://dev.mysql.com/doc/refman/4.1/en/date-and-time-type-overview.html:
The range is '1970-01-01 00:00:01' UTC to partway through the year 2037. 
TIMESTAMP values are stored as the number of seconds since the epoch ('1970-01-01 
00:00:00' UTC). A TIMESTAMP cannot represent the value '1970-01-01 00:00:00' 
because that is equivalent to 0 seconds from the epoch and the value 0 is 
reserved for representing '0000-00-00 00:00:00', the “zero” TIMESTAMP value.

HTH

 - Nuno


Thread
Cannot convert value '0000-00-00 00:00:00' from column 4 to TIMESTAMPTaco Fleur22 Jan
  • Re: Cannot convert value '0000-00-00 00:00:00' from column 4 to TIMESTAMPNuno Oliveira22 Jan
    • RE: Cannot convert value '0000-00-00 00:00:00' from column 4 to TIMESTAMPTaco Fleur22 Jan
      • RE: Cannot convert value '0000-00-00 00:00:00' from column 4 to TIMESTAMPNuno Oliveira22 Jan
RE: Cannot convert value '0000-00-00 00:00:00' from column 4 to TIMESTAMPtere22 Jan
  • RE: Cannot convert value '0000-00-00 00:00:00' from column 4 to TIMESTAMPTaco Fleur22 Jan