if date is 0000-00-00 , it is displayed as -0001-11-30. phpMyAdmin looks fine
if date is 0000-00-00 , it is displayed as -0001-11-30. phpMyAdmin looks fine
rbyrns
Posts: 36Questions: 9Answers: 0
Anyone have a clue why this might be happening? I am guilty of importing the dates in as varchar then just changing the field type to date(10). Might be a mysql thing.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I fixed it by "update set datefield = null where datefield = '0000-00-00'. No idea though why datafields showed it wrong, while phpMyAdmin showed it right.
Sounds like a timezone conversion possibly. phpMyAdmin has a whole load of code for normalising connections, which might be why it shows a different result.
Allan