found this, didn't help: https://laracasts.com/discuss/channels/eloquent/timestampdatetime-issue-with-51-sqlserver
when set date field on model protected $dates = ['orderdate','timestamp'];
call $order->orderdate
following error:
invalidargumentexception message 'unexpected data found. unexpected data found. separation symbol not found format separator not match trailing data'
but, if manually create carbon date object using same formatting , copying\pasting date directly sql server, successfully:
>>> carbon\carbon::createfromformat('y-m-d h:i:s.000', '2015-12-29 00:00:00.000'); => carbon\carbon {#835 +"date": "2015-12-29 00:00:00.000000", +"timezone_type": 3, +"timezone": "utc", }
what missing?
for reason laravel seeing m j y h:i:s:000a
-- driver. added protected $dateformat = 'm j y h:i:s:000a';
ms sql server models using.
Comments
Post a Comment