• 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

Custom add to cart button URL for specific product in WooCommerce?

Laravel Delete and Update

PHP header location absolute URL

Laravel Livewire: jQuery not working in child component loaded via @if statement

Log a user out of a website when they put their computer to sleep

loop through an anchor id

Split a string array into pieces

Symfony 4: how to allow dynamic values for array nodes in bundle configuration?

PHPMyAdmin not working as intended at remote server. Error 500, $respond not found

Problem with fetching data from database in Laravel

carbon generated datetime not stored correctly into the database

Laravel phpunit test failing authorization

Eloquent insert id with sequence next value

Laravel set default language not working

Use same method for inertia response and json response Laravel Jetstream

About Contact Privacy policy Terms and conditions