Jump to content

[SOLVED] mysql february problem


twofifty

Recommended Posts

Can't be done:

As of 5.0.2, the server requires that month and day values be legal, and not merely in the range 1 to 12 and 1 to 31, respectively. With strict mode disabled, invalid dates such as '2004-04-31' are converted to '0000-00-00' and a warning is generated. With strict mode enabled, invalid dates generate an error. To allow such dates, enable ALLOW_INVALID_DATES. See Section 5.2.6, “SQL Modes”, for more information.

 

If you're wanting to store invalid dates, then you shouldn't be storing them in DATE fields. You would need to store it as a string type and parse it out. Besides that, even when it's pulled into PHP, it would automatically be calculated as March 1.

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.