'0000-00-00' is an invalid date

From: bill <william_at_TechServSys.com>
Date: Sun, 4 Feb 2018 07:52:16 -0500
Message-ID: <p56vm1$1luu$1_at_gioia.aioe.org>



[Quoted] I have a database with a a field 'episodes.ending'. For reasons [Quoted] that are lost in time if the episode has not ended the ending field contains '0000-00-00' rather than NULL.

In upgrading to 16.04 LTS from 14.4 LTS I am now advised that 1292 - Incorrect datetime value: '0000-00-00'.

looking up the error -> Error: 1292 SQLSTATE: 22007 (ER_TRUNCATED_WRONG_VALUE)
Message: Truncated incorrect %s value: '%s'

Lest any of you worry about my mental state, I am aware that [Quoted] '0-000-00-00' is not a valid datetime.

[Quoted] I can SELECT * FROM `episodes` where `ending` = '0000-00-00' without error, but
update`episodes` set `ending` = NULL
where `ending` = '0000-00-00'
gives me the error.

any suggestions how to render the 'ending' field updatable?

-bill Received on Sun Feb 04 2018 - 13:52:16 CET

Original text of this message