• 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

Custom add to cart button URL for specific product in WooCommerce?

500 Internal Server Error on Ajax request. Not sure the origin of the problem

GA4 custom event from server side, can someone tell me how i can do the following code in php?

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

Can we define variables in `.tpl` files?

Laravel 5 session not persisting after user is logged in

Install mysql client in docker image

Add a text next to stock quantity if it is less than 10 in Woocommerce single product

Why isn't my PHP exception working?

Insert And Retrieve Data in MySQL with $.post Noob Question

Add bold text and line break into Laravel Notification Email

Additional price based on cart item count in WooCommerce

Can't exclude directories from .htaccess mobile redirect?

how can I set a session variable in Drupal 8 and get it in a php script?

Parameter is not sent to Laravel route in Ajax

About Contact Privacy policy Terms and conditions