• 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 Mock the Request Class in Laravel?

What is my SQL missing?

Populate Dynamic Dropdowns List in Codeigniter

phpmyadmin : Depends: php-twig (>= 2.9) but 2.6.2-2 is to be installed. WHAT?

Display the default discounted price and percentage on Woocommerce products

I need to link Google Sheet with my Laravel

Having trouble with PDO queries (Notice: Undefined index)

How to unlink image from folder?

Laravel Database Strict Mode

SQLSTATE[HY000]: General error: 1 table posts has no column named *

Laravel implode array items to new lines

SQL AVG() to 2 decimals

Laravel Passport - Not able to get token string in response?

How to create a cookie to store the timestamp of when a page is first loaded with php

Distribute array row data to make multiple new rows

About Contact Privacy policy Terms and conditions