Insert a date like 2006-00-00

Mysql makes possible to insert a date like 2006-00-00. And i want to do
that, if my client dont knows the month he puts it to zero.
But when i do something like this:

fp = ProfessionalFunction.new(:people_id => 5, :start => “2006-12-0”)
fp.save

it puts a NULL value in the start field (type date).

suggestions??

Bruno Carlos wrote:

Mysql makes possible to insert a date like 2006-00-00. And i want to do
that, if my client dont knows the month he puts it to zero.
But when i do something like this:

fp = ProfessionalFunction.new(:people_id => 5, :start => “2006-12-0”)
fp.save

it puts a NULL value in the start field (type date).

suggestions??

Ugh, mysql allows that? Suggestion – don’t. Create three fields –
year, month, and day, and set nullable accordingly.

Joe