realestateconz / MssqlBundle

Symfony 2 Microsoft SQL Server Bundle
37 stars 63 forks source link

NVarchar To DateTime #12

Open dkachuk opened 9 years ago

dkachuk commented 9 years ago

Hello! I found a problem with converting a DateTime NVarchar with MS SQL Server 2014, the date format generated by the bundle is ('Ymd H: m: s.000') and should be ('d / m / YH: m: s.000 ') ... Line number 76 of DateTimeType.php file is where the problem lies ...

How I can do to change this without affecting future updates of the bundle?

[code] public function convertToDatabaseValue($value, AbstractPlatform $platform) { return ($value !== null) ? $value->format('d/m/Y H:i:s' . '.000') : null; // ? $value->format('Y-m-d H:i:s' . '.000') : null; } [/code]