• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Laravel Carbon throws error The format separator does not match

phplaraveldatedatetimelaravel-5


PHP Snippet 1:

date("D d M", strtotime("2017-02-09 18:30:00"));
//outputs "Thu 09 Feb"

date("D d M", strtotime($matchArr['matchTime']);

PHP Snippet 2:

date('l j F', strtotime($matchArr['matchTime']))

PHP Snippet 3:

Carbon::createFromFormat('Y-m-d H:i:s', '2017-02-09 18:30:00');

Related Snippets

send email using gmail-api and google-api-php-client

printing all running session variable in laravel 5.1

Parameter is not sent to Laravel route in Ajax

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"?

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

Exception thrown during the rendering of a template("Parameter "id" for route "url" must match "[^/]++" ("" given) to generate a corresponding URL.")

Cache clear probem in Larave

Create a new line whenever an array value reaches more than 10 characters

Prestashop webservice API creating cart rules

yii2 and mssql insert varbinary into model

Natural ORDER in Laravel Eloquent ORM

VichUploaderBundle error "Expected argument of type "File", "NULL" given" when submitting the form without selecting any file

Laravel Displaying image from database

Accessors (Getter) & Mutators (Setter) On a Pivot Table in Laravel

Symfony - "framework.test" config is not set to true

About Contact Privacy policy Terms and conditions