• 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

How to run a shell as root from php (apache)

How to assert parameter attribute sub-structures in PHPUnit mock call expectations

Fatal error: [] operator not supported for strings

How to properly set "0000-00-00 00:00:00" as a DateTime in PHP

PHP my timezone is no setting up in PHP.ini File in xampp

Laravel 5.1 Unknown database type enum requested

Implode array with array of glue strings

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

How to change the app environment at run time?

Target Individual Form Instance/Counter Inside A PHP While Loop

Uncaught TypeError: Cannot read property 'length' of null when retrieving tags from wp

How can I pass the list to the component variable in Laravel?

Issue saving card for customer

Project structure for PHP

Limit of log line written to Apache Errorlog from mod php error_log

About Contact Privacy policy Terms and conditions