Results 1 to 4 of 4

Thread: mysql: ERROR 1292 (22007): Incorrect date value: '0000-00-00'

  1. #1
    Join Date
    Sep 2019
    Beans
    226

    mysql: ERROR 1292 (22007): Incorrect date value: '0000-00-00'

    Code:
    mysql> UPDATE some_table SET some_date_column='2024-04-10' WHERE some_date_column='0000-00-00' ;
    ERROR 1292 (22007): Incorrect date value: '0000-00-00' for column 'some_date_column' at row 1
    Server version: 8.0.26 MySQL Community Server - GPL

    What is please optimal solution ?

  2. #2
    Join Date
    Jan 2020
    Beans
    12

    Re: mysql: ERROR 1292 (22007): Incorrect date value: '0000-00-00'

    Why do you post this question in multiple forums?
    You have already got answer here.
    Last edited by ruwolf; April 27th, 2024 at 10:51 PM. Reason: Grammar

  3. #3
    Join Date
    Sep 2019
    Beans
    226

    Re: mysql: ERROR 1292 (22007): Incorrect date value: '0000-00-00'

    Quote Originally Posted by ruwolf View Post
    Why do you post this question in multiple forums?
    You have already got answer here.
    Because I believe it increases probability of getting best answer (and faster). (I've posted it at same moment which I see is not apparent because this forum does not show exact time of posting)

  4. #4
    Join Date
    Sep 2019
    Beans
    226

    Re: mysql: ERROR 1292 (22007): Incorrect date value: '0000-00-00'

    solved by
    Code:
    UPDATE some_table SET some_date_column='2024-04-10'
    WHERE some_date_column IS NULL;

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •