• 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 convert a carbon into string, to take the date only?

Laravel unique validation on multiple columns

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

Composer Warning: openssl extension is missing. How to enable in WAMP

Parsing JSON File to array in PHP

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

Form Validation and Submission to database

Modify microseconds of a PHP DateTime object

How to programmatically find public properties of a class from inside one of it's methods

Laravel database insert with combining array and string

Wordpress how to get the post thumbnail inside a figure tag

How to unlink image from folder?

file_get_contents() without "Http" to access external URL [closed]

Store multiple fields in JSON column (Nova CMS)

How to pass data to all views in Laravel 5?

About Contact Privacy policy Terms and conditions