• 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

Display a success custom notice after Placing an Order in WooCommerce

Magento 2 - Controller returning blank page

WordPress Security Standards want me to escape my html, but how to do it correctly?

Adding hreflang tags automatically in WordPress subdirectory multisite

PHP's array_map including keys

Auto increment id JSON

Wordpress add responsive srcset header image to theme

XSS attack still works despite htmlspecialchars() doing its work

Correctly determine if date string is a valid date in that format

How do I upload a laravel project on cPanel shared hosting?

Is there a way to use the same parameter into multiple place in the same query with Eloquent? [duplicate]

PHP sort array of objects by two properties

How to put php code inside opening and closing shortcodes

PHP: Telegram Bot: Insert line break to text message

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

About Contact Privacy policy Terms and conditions