• 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

Adding one microsecond to Datetime object in PHP

PHP block shortcut in Visual Studio Code

Select option from dropdown menu with PHP and mySql

mysql_result is defined but mysql_free_result warns it expected a resource

PhpSpreadSheet: How to save Workbook sheets in individual CSV files

Detect a fetch request in PHP

Show only featured products in Woocommerce shop page

Sync Records With Default Values in Pivot Tables, Call to undefined method syncWithPivotDefaults()

Webscraping Symfony/Panther: Can't get HTML

Modify microseconds of a PHP DateTime object

Sentry + Laravel: how to log an already catched Exception?

How to loop sql table data inside a html table

api response laravel doesn't show

Getting output of MS stored procedure on php call

How to set time with DateTime modify?

About Contact Privacy policy Terms and conditions