Clone or Add Record changes null date to "000-00-00"
Posted: Sun Feb 10, 2013 11:08 pm
Hi,
I saw a post with a similiar problem but I did not see a solution.
I have a table with a number of date fields in it. These fields are defined as null with a default of null. When I load the data into the table, I notice in phpyMyAdmin that the date fields that don't have a date in them are changed to "0000-00-00". I fixed the exisitng data by using SQL to change the "0000-00-00" to nulls. I thought that might fix the problem but then I noticed that when I add a record or clone a record in this table, that the dates that I don't fill in show as "0000-00-00" in phpMyAdmin.
I have a report where I am checking to see if the date is not null and then moving the date into a variable. As a result this report is moving invalid dates into the variable.
What do you suggest?
John
I saw a post with a similiar problem but I did not see a solution.
I have a table with a number of date fields in it. These fields are defined as null with a default of null. When I load the data into the table, I notice in phpyMyAdmin that the date fields that don't have a date in them are changed to "0000-00-00". I fixed the exisitng data by using SQL to change the "0000-00-00" to nulls. I thought that might fix the problem but then I noticed that when I add a record or clone a record in this table, that the dates that I don't fill in show as "0000-00-00" in phpMyAdmin.
I have a report where I am checking to see if the date is not null and then moving the date into a variable. As a result this report is moving invalid dates into the variable.
What do you suggest?
John