Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Argument #1 ($baseObject) must be of type DateTimeInterface, string given

 $date1 = new DateTime("your_date");
 $date1 = new DateTime("your_date");
 $diff=date_diff($date1,$date2);
 echo $diff->format("%R%a days");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Argument #type #string
ADD COMMENT
Topic
Name
6+3 =