mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
MINOR: cast to datetime for higher precision
This commit is contained in:
parent
ab1b49fdf0
commit
6b82e2b1c2
@ -1346,7 +1346,7 @@ class MSSQLDatabase extends SS_Database {
|
||||
if(preg_match('/^now$/i', $date)) {
|
||||
$date = "CURRENT_TIMESTAMP";
|
||||
} else if(preg_match('/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/i', $date)) {
|
||||
$date = "'$date'";
|
||||
$date = "'$date.000'";
|
||||
}
|
||||
|
||||
if($format == '%U') return "DATEDIFF(s, '19700101', $date)";
|
||||
|
Loading…
Reference in New Issue
Block a user