I'm using CakePHP. When trying to insert a null value into a field it turns into 1900-01-01 00:00:00.
Here's a sample of my code:
$this->save(array(
'date_signed' => null
));
What seems to be the error a开发者_运维知识库nd how do I fix it? Thanks in advance!
SQL server does not appear to have a NULL date value, instead it uses a minimum value which is what you are seeing here. For standard SQL DateTime2 the minimum value is 0001-01-01 00:00:00
精彩评论