• 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

Not able to override collapsible.js in magento 2

How to set time with DateTime modify?

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

Search for array row with specific column value and return another value from qualifying row

How to use React Router with Laravel?

How to add automatically collapse/expand in content wordpress (single.php)?

hidden INPUT value not available in $_POST

Composer Script echo

Unit (real unit test) of test laravel relationship

Can't remotely connect to MySQL error (13) with PHP script, connecting through CLI works

Cannot connect to own websocket server when on secured domain

Eloquent insert id with sequence next value

Laravel: HTML in notification

Convert every two values of an associative array into key-value pairs

Yii Ajax Submit button

About Contact Privacy policy Terms and conditions