I have a column in database whose type is datetime. Each time user changes something this gets updated to note that user changed something on website at this date/time.
The query that im using is:
INSERT INTO Test(bunch columns, ChangedAt) VALUES (bunch values, NOW())
Now after couple of days i checked the table and there was one row having this value for the ChangedAt column:
2020-11-14 00:00:00
any ides how the hell it got 2020? and why there is time 00:00:00
thanks
Only 2 possible reasons.
computer date was wrong… wich would be a coincidence to get 00:00:00
or the row was updated/inserted like that.
as you can see.. it would be hard to insert a different value by mistake and get it inserted… 20201114000000 in your case…