• 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

How to retrieve Active Directory group policy maximum password age using LDAP

WHERE IN array binding in DB::raw laravel 5.4

Add and update products to session cart in Laravel

XSS attack still works despite htmlspecialchars() doing its work

array_key_exists(): The first argument should be either a string or an integer

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

Laravel 5 issue with wherePivot

Shopify password update using Shopify API

(PHPUnit) PHP Fatal error: Uncaught Error: Call to undefined function each()

Display the WooCommerce product price inside a custom function

PHP mail sending empty mails

PHP only Hit Counter?

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

PHP Fatal error: Class not found - PHPUnit

Laravel : How to Create Dropdown to Select FOREIGN KEY from Other Table?

About Contact Privacy policy Terms and conditions