• 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

SMTP ERROR: MAIL FROM command failed: 530 5.7.0 Must issue a STARTTLS command first when using PHPMailer

Prevent blank space in pdf pages (DomPdf)

I'm trying to write a clean url for my website using the $_SERVER['REQUEST_URI'] in php

Required field only if another field has a value, must be empty otherwise

Debugging Stripe Webhook Event

Yoast SEO (WordPress Plugin) - Get plugin generated data manually

Make Shipping Method fields Mandatory on Woocommerce checkout page

Send POST data via raw JSON with Postman

Laravel dosen't connect with Oracle

PHP - CURL using HTTPS [closed]

What's the net::ERR_HTTP2_PROTOCOL_ERROR about?

How to get AJAX to post on second page?

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"?

What is my SQL missing?

PHPUnit 7: Failed asserting that exception of type InvalidArgumentException is thrown

About Contact Privacy policy Terms and conditions