• 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

PHP | "The requested PHP extension bcmath is missing from your system."

Dynamic dropdown Ajax PHP request

Problem with fetching data from database in Laravel

How to display table header in every page using FPDF library?

add " ? " in url via htaccess RewriteRule

Whats the point of running Laravel with the command 'php artisan serve'?

Laravel Excel::store file empty after stored

Laravel MSSQL Server Connection not working

I want to display a sweetalert after the inserting of data in my database

Is there a way to use Foundry Model for Authentification inside Functional Tests?

WooCommerce Subscriptions: Remove role on cancelled subscription

SMTP ERROR: MAIL FROM command failed: 530 5.7.0 Must issue a STARTTLS command first when using PHPMailer

Artisan, creating tables in database

Laravel set default language not working

How to insert data from multiple select dropdown values into database?

About Contact Privacy policy Terms and conditions