• 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 get monthly wise data in laravel

Symfony 4: "Autowire: you should configure its value explicitly."

Open a popup box after receiving result from ajax

Creating Combinations of Elements

PHP: Insert marker every 3 iterations

Laravel relationship belongsToMany with composite primary keys

Laravel Pagination links() not working

strpos(): Argument #1 ($haystack) must be of type string, array given

Reducing authentication calls on external API (Laravel 5.6)

Get WooCommerce products from specific category

PHP-Sort array based on another array?

What will the best solution for this multiple optional filter?

Submitting a form with ajax in Wordpress

Laravel Unresolvable dependency resolving [Parameter #0 [ <required> $method ]] in class GuzzleHttpPsr7Request

How do I call Validator from a namespace with an already existing Validator class

About Contact Privacy policy Terms and conditions