-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Closed
Description
I have to use the german edition of MS SQL Server 2012 for a client project.
If I use DateTime columns like timestamps I get the following error:
[Exception]
SQLSTATE[22007]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Bei der Konvertierung eines nvarchar-Datentyps in einen datetime-Datentyp liegt der Wert außerhalb des gültigen Bereichs. (SQL: insert into [users]
([username], [password], [updated_at], [created_at]) values (?, ?, ?, ?)) (Bindings: array (
0 => 'username',
1 => 'hash',
2 =>
DateTime::__set_state(array(
'date' => '2013-03-21 19:11:11',
'timezone_type' => 3,
'timezone' => 'Europe/Berlin',
)),
3 =>
DateTime::__set_state(array(
'date' => '2013-03-21 19:11:11',
'timezone_type' => 3,
'timezone' => 'Europe/Berlin',
)),
))
I had to change Illuminate\Database\Query\Grammars\SqlServerGrammar to get it working:
public function getDateFormat()
{
return 'd.m.Y H:i:s.000';
}
...
Metadata
Metadata
Assignees
Labels
No labels