• 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

Call authenticate manually in router middleware

Error converting docx to pdf using Unoconv

What will the best solution for this multiple optional filter?

Failed user login on production server using Symfony framework (Authentication request could not be processed due to...)

Using spatie/media-library, how to rename a collection of uploaded files?

Maatwebsite Excel 3.1 : how do I skip duplicate data when imported?

How to properly set "0000-00-00 00:00:00" as a DateTime in PHP

Converting IPv6 to IPv4 address in PHP

WooCommerce - unset "<product> removed notice…" on cart page

How to average columns of data from multiple, flat arrays?

Access denied for user 'homestead'@'localhost' (using password: YES)

Laravel 5 controller sending JSON integer as string

PHP web3 ERC20 token function call

Get WooCommerce product variation attribute terms in admin products general box

Laravel: Why is my variable not being set while it's in the construct function of the controller?

About Contact Privacy policy Terms and conditions