symfony doctrine type datetime expected format y-m-d h:i:s
From the value "2014-03-03"
, it seems that your database column type is date
but not datetime
.
Run php app/console doctrine:schema:update
to check whether there are changes.
i have the same issue and i have resolve it by adding the code bellowthe problem is getted because postgres register microseconde when it's different to 0 this produce the isse
use Doctrine\DBAL\Types\Type;Type::overrideType('datetime', 'Doctrine\DBAL\Types\VarDateTimeType');Type::overrideType('datetimetz', 'Doctrine\DBAL\Types\VarDateTimeType');Type::overrideType('time', 'Doctrine\DBAL\Types\VarDateTimeType');Type::overrideType('datetime_immutable', 'Doctrine\DBAL\Types\VarDateTimeImmutableType');Type::overrideType('datetimetz_immutable', 'Doctrine\DBAL\Types\VarDateTimeImmutableType');Type::overrideType('time_immutable', 'Doctrine\DBAL\Types\VarDateTimeImmutableType');
you can read more here https://www.doctrine-project.org/projects/doctrine-dbal/en/2.10/reference/known-vendor-issues.html