• 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 Multiple Custom Post Types in Wordpress

Star and Half Star Rating in Laravel

array_key_exists(): The first argument should be either a string or an integer

How to get monthly wise data in laravel

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

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'posts.post' doesn't exist

Remove product downloads section in woocommerce email notifications

MongoDB Duplicate Documents even after adding unique key

Is there an equivalent of DynamoDB on Azure as a PHP session Handler

browsersync doesn't work with XAMPP

How to Install Composer Require doctrine/dbal

Chunk and transpose a flat array into rows with a specific number of columns

PHP and WebView - Cookie doesn't are the same

ldap is missing from system when installing adldap2 in laravel

PHP web3 ERC20 token function call

About Contact Privacy policy Terms and conditions