我试图以这种方式在symfony3.4中设置日期和时间字段:$eventProject=new$eventProject();$eventProject->setDateFrom('2018-05-09');当我保存这些值时,出现如下错误:SQLSTATE[23000]:Integrityconstraintviolation:1048Column'dateFrom'cannotbenullInConversionException.phpline95:CouldnotconvertPHPvalue'2018-05-09'oftype'string'totype'datetime'.E