mercredi 23 octobre 2019

Carbon return InvalidArgumentException for a particular format conversion

I have a date returned from a javascript library in the format 23/10/2019 12:03:46 and while saving in the database i am trying to convert into a carbon object like below:-

 $order->delivery_date =  Carbon::createFromFormat('dd/mm/Y H:i:s',$request->time);

getting error

InvalidArgumentException: Unexpected data found.

also tried these similar links link1 link2 but not able to get out of this problem.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire