• 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

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

Adding one microsecond to Datetime object in PHP

Installing Composer - Internal Error

PHP how to detect if running on arm64 cpu?

Adding hreflang tags automatically in WordPress subdirectory multisite

sqlsrv_num_rows() expects parameter 1 to be resource, boolean given

Match single unknown parameter php (Morse-code Regex)

Sum array values of a column within each column of an array with 3 levels

Laravel: Why is my variable not being set while it's in the construct function of the controller?

How to change the app environment at run time?

How to use React Router with Laravel?

Add Metadata, headers (Expires, CacheControl) to a file uploaded to Amazon S3 using the Laravel 5.0 Storage facade

How to create custom authentication in laravel 8?

Getting error: CodeIgniterDatabaseBaseResult::getResult in CodeIgniter

Fetch files from next cloud storage and display in Laravel website

About Contact Privacy policy Terms and conditions