• 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

Natural ORDER in Laravel Eloquent ORM

Utf8 encoding issue with Laravel

Assets not referencing to public folder (Laravel)

Correctly determine if date string is a valid date in that format

Yoast SEO (WordPress Plugin) - Get plugin generated data manually

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'column_name' in Laravel

Apply session id from request header

Transform array, set each array element with parent key php

calling server using nusoap with complextype

Remove country code from phone number?

How to run or debug php on Visual Studio Code (VSCode)

Laravel Factory not calling callback 'afterCreating'

Add a custom text for a particular product on specific email notification in Woocommerce

"Notice: Undefined variable", "Notice: Undefined index", "Warning: Undefined array key", and "Notice: Undefined offset" using PHP

Store multiple fields in JSON column (Nova CMS)

About Contact Privacy policy Terms and conditions