Blank date sends 0000-00-00 00:00:00 to database

My update form sends a value of 0000-00-00 00:00:00 when I submit a record. I want it to be null. Is this a form setting or a database setting? MySQL on a .asp page

Just guessing here but you probably have your field type in your database as ‘timestamp’? If so, maybe try changing it to ‘datetime’?

Thanks for the reply but it’s not that. data type is date, Default is null and I checked the box to allow null values

Are you using the condition field for the value in the query builder, where you insert the data?

1 Like

I ran into this when using a date picker input. Solved using the method Teodor mentions above.

This is actually on update (not insert) and the only condition is the id. I did try recreating the date field as text first then changing to a date picker and it appears that it worked. I have date pickers in various places that were created by the generator and they have been fine (i think) . Perhaps we haven’t done enough updating to find them all. frustrating

I ran into this again on a php page. What condition would I apply to make it null?