mercredi 29 mai 2019

Wrong locale date format saving to SQL Server with Laravel

Our code in Laravel receives a date in Y-M-D format and tries to save it to a SQL Server database.

SQL Server language is italian and our code is OK with a Y-D-M date.

Is there a way to specify the date format or the locale used? Setting the language via statement doesn't work.

Our code is something like this:

DB::statement('SET LANGUAGE us_english');
DB::table('tablename')->insert($saveData);



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire