0
我使用學說2和Yii和Oracle
。學說2錯誤ORA-01843:不是有效月份
我有一個DateTime
場
/**
* @var \DateTime
*
* @ORM\Column(name="CREATE_DATE", type="datetime", nullable=true)
*/
private $createDate;
我用這個代碼中插入人表
$date = new \DateTime("now");
$person = new Person();
$person->setCreateDate($date);
$person->setLastName('name');
$entityManager->persist($person);
$entityManager->flush();
但這個錯誤:
An exception occurred while executing 'INSERT INTO PERSON (PERSON_ID, CREATE_DATE, LAST_NAME) VALUES (?, ?, ?)' with params [27, "2014-10-29 09:23:38", "name"]:
ORA-01843: not a valid month
請幫助我。
試試這個:http://stackoverflow.com/questions/14930670/doctrine-2-oracle-datetme-column-showing-not -a化有效本月與上插入實體 – 2014-10-29 09:39:45