• 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

PHP mail function is sending blank message body

How to change the app environment at run time?

Change the alert text on add to cart action without selected variation in Woocommerce

Laravel 8 Multiple Relationships for Factory

Attempted to call an undefined method named "get" of class "MailController"

Dynamic table in HTML using MySQL and php

Unable to create lockable file - Laravel 8 & PHP 8

How to test laravel controller method?

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

Laravel Unresolvable dependency resolving [Parameter #0 [ <required> $method ]] in class GuzzleHttpPsr7Request

Laravel-fopen: failed to open stream: Permission denied

How to to send mail using gmail in Laravel?

get attribute from class not working php 7

Form Validation and Submission to database

SilverStripe unable to populate multiple member Childs

About Contact Privacy policy Terms and conditions