• 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

Inserting data into SQL Server Db An Invalid direction was specified

Can't call javascript alert alertify library from PHP

Laravel multi auth - Authentication user provider [] is not defined

Getting error: CodeIgniterDatabaseBaseResult::getResult in CodeIgniter

How update php.ini on a Mac OS X Mojave?

add " ? " in url via htaccess RewriteRule

Laravel Collections. Is there some kind of assertStructure method?

Show only featured products in Woocommerce shop page

Converting array to string and then back in PHP

Filter WooCommerce related products by Polylang language

Failed user login on production server using Symfony framework (Authentication request could not be processed due to...)

CONCAT columns with Laravel 5 eloquent

Laravel 5.2: Unable to locate factory with name [default]

WordPress Subquery returns more than 1 row on SELECT

PHP/HTML: Creating A SubMenu

About Contact Privacy policy Terms and conditions