1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-02 12:21:06 +02:00

Microsoft SQL Server and MSSQL support for microseconds fix cont.

This commit is contained in:
David Grudl
2017-07-26 19:25:38 +02:00
parent 4f0566ece7
commit 43d3b57a8d

View File

@@ -286,7 +286,7 @@ class SqlsrvDriver implements Dibi\Driver, Dibi\ResultDriver
if (!$value instanceof \DateTime && !$value instanceof \DateTimeInterface) {
$value = new Dibi\DateTime($value);
}
return $value->format("'Y-m-d H:i:s.u'");
return 'CONVERT(DATETIME2(7), ' . $value->format("'Y-m-d H:i:s.u'") . ')';
}