• 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

selected value from the listbox in php

Laravel relationship belongsToMany with composite primary keys

Elasticsearch - Want to sort by field in all indices where that particular field available or not if not then avoid it

Transform array, set each array element with parent key php

Show date difference as "20" instead of "20 years ago"

Yii2 select2 database exception number of bound variables does not match number of tokens

Laravel unique validation on multiple columns

Python - Include another Python script

wordpress : How to specify the cause "This site can’t be reached"

how to use extended ASCII instead of unicode in PHP

protect my blog content

Laravel Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) on a sub query with "ROW_NUMBER() OVER PARTITION"

How to get array values using foreach in laravel

Create tags in laravel post publishing

Call to undefined function openssl_decrypt

About Contact Privacy policy Terms and conditions