• 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

How to get multiple values with same key from an array PHP

How to get quarter for future date using Carbon?

OctoberCMS / Anonymous Global Scope

How to debug in WooCommerce 3+

RabbitMQ PRECONDITION_FAILED - unknown delivery tag

How to KeyBy where multiple items have the same key

How can I make a full text index of the column?

Select option from dropdown menu with PHP and mySql

How to solve cURL error 60: SSL certificate in Laravel 5 while Facebook authentication

Filter array by skipping every nth element from the end

How update php.ini on a Mac OS X Mojave?

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

Losing session data after POST from third party website

Twig - How to check if variable is a number / integer

nginx err_connection_refused, can anyone help me?

About Contact Privacy policy Terms and conditions