Search
 
SCRIPT & CODE EXAMPLE
 

PHP

object of class datetime could not be converted to string

// Must convert from DateTime to String
$tempDate = DateTime::createFromFormat('j-M-Y', '15-Feb-2009');
echo $tempDate->format('Y-m-d H:i:s');
// NOT echo $tempDate!!!
Comment

PREVIOUS NEXT
Code Example
Php :: php configuration 
Php :: add action wp_footer 
Php :: how to escape html tags in php 
Php :: php array_sum 
Php :: php reset mysql array 
Php :: laravel redirect back with input 
Php :: php mysql datetime format string 
Php :: is php still used 
Php :: laravel plural and singular 
Php :: laravel migration set default value 
Php :: error first laravel 
Php :: Extract images from a folder in php 
Php :: laravel get parameters from request 
Php :: phoenix input type password 
Php :: behamin brequest installation on laravel 
Php :: get post thumbnail url 
Php :: integer division in php 
Php :: get logged user id laravel 
Php :: sudo apt-get install php7.0-gd 
Php :: how to get php version in xampp 
Php :: phpspreadsheet password protected 
Php :: delete uploaded media file wp using code 
Php :: create array from string with commas php 
Php :: show date time with milliseconds php 
Php :: php divide string into parts 
Php :: laravel scaffolding 
Php :: different days in carbon laravel between different dates 
Php :: php foreach associative array 
Php :: join 2 tables laravel 
Php :: how to fetch jQuery in wordpress 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =