• 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

phpseclib 2.0 can not use Composer to create autoload

PHPUnit 7: Failed asserting that exception of type InvalidArgumentException is thrown

Performance of foreach, array_map with lambda and array_map with static function

PHP random string generator

Detect if PHP session exists

Custom API and cunsuming in php?

How to make a foreign key not using primary key

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

How to to send mail using gmail in Laravel?

How to get array values using foreach in laravel

PHP if in_array() how to get the key as well?

How to remove from a multidimensional array all duplicate elements including the original?

Laravel Get Days In Month From Month Number?

How do I do HTTP basic authentication using Guzzle?

How to change the app environment at run time?

About Contact Privacy policy Terms and conditions