Quote from MySQL documentation ...

"MySQL allows you to store some wrong date values into DATE and DATETIME columns (like 
2000-02-31 or 2000-02-00). The idea is that it's not the SQL server job to validate 
date. If MySQL can store a date and retrieve exactly the same date, then MySQL will 
store the date. If the date is totally wrong (outside the server's ability to store 
it), then the special date value 0000-00-00 will be stored in the column." 

IMHO, it is the database job to ensure that date/time is valid as it's stored.


Hassan Shaikh

Reply via email to