Inserting any date in laravel 5.5 into a SQLserver database gives me the following error:
SQLSTATE[22003]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]
Error de desbordamiento aritmético al convertir expression al tipo de datos datetime.
Apparently it is because laravel sends the date with the format 'Y-m-d H: i: s.000' (2017-10-24 13: 22: 35.000)
So far so good the problem is that before executing this query laravel sends the following instructions to the database:
-- network protocol: TCP/IP
set quoted_identifier on
set arithabort off
set numeric_roundabort off
set ansi_warnings on
set ansi_padding on
set ansi_nulls on
set concat_null_yields_null on
set cursor_close_on_commit off
set implicit_transactions off
set language Español
**set dateformat dmy**
set datefirst 1
set transaction isolation level read committed
set dateformat dmy means that you should receive 'd-m-Y H: i: s.000' but I do not know how to change the configuration so that the instructions and querys are consistent.
How can I correct this error?