• 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: Is there a non-case sensitive way to sort a collection by an attribute?

correct PHP headers for pdf file download

Can't call javascript alert alertify library from PHP

How to install PHP composer inside a docker container

Laravel 5.2: Unable to locate factory with name [default]

Toggle between a textbox and a select using PHP

storagelogs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied

Confirm Leave on External Links in Wordpress

Best way to scrolldown onpageload

How can I make this nested location configuration use the correct path to call a php program?

How to use functions that are declared in snippets in Evolution CMS (Modx) in an external PHP Script?

Dropdown with current value from Mysql

Adding reCAPTCHA v2 into my PHP file

Correct way to use LIKE '%{$var}%' with prepared statements?

Laravel lang slug in url

About Contact Privacy policy Terms and conditions