• 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

Laravel 5 issue with wherePivot

Laravel Get Days In Month From Month Number?

Fatal error: Uncaught mysqli_sql_exception: Unknown database 'test' in ... (How do I fix that? Using PHP)

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

Cannot connect to own websocket server when on secured domain

500 Internal Server Error on Ajax request. Not sure the origin of the problem

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

Laravel 5.1 Unknown database type enum requested

Laravel Database Strict Mode

Custom post type single page not working

How can i hide dt if dd got empty value

SQLSTATE[HY000]: General error: 1 table posts has no column named *

Passing a boolean value from checkbox in Laravel form

Phalcon: setStatusCode returns empty response

Is it possible to change the table name in the migration file-laravel

About Contact Privacy policy Terms and conditions